pub trait TokenSink {
type Handle;
fn process_token(
&mut self,
token: Token,
line_number: u64
) -> TokenSinkResult<Self::Handle>;
fn end(&mut self) { ... }
fn adjusted_current_node_present_but_not_in_html_namespace(&self) -> bool { ... }
}
Expand description
Types which can receive tokens from the tokenizer.
Required Associated Types
Required Methods
sourcefn process_token(
&mut self,
token: Token,
line_number: u64
) -> TokenSinkResult<Self::Handle>
fn process_token(
&mut self,
token: Token,
line_number: u64
) -> TokenSinkResult<Self::Handle>
Process a token.
Provided Methods
fn end(&mut self)
sourcefn adjusted_current_node_present_but_not_in_html_namespace(&self) -> bool
fn adjusted_current_node_present_but_not_in_html_namespace(&self) -> bool
Used in the markup declaration open state. By default, this always returns false and thus all CDATA sections are tokenized as bogus comments. https://html.spec.whatwg.org/multipage/#markup-declaration-open-state