Trait html5ever::tokenizer::TokenSink
[−]
[src]
pub trait TokenSink { fn process_token(&mut self, token: Token); fn adjusted_current_node_present_but_not_in_html_namespace(&self) -> bool { ... } fn query_state_change(&mut self) -> Option<State> { ... } }
Types which can receive tokens from the tokenizer.
Required Methods
fn process_token(&mut self, token: Token)
Process a token.
Provided Methods
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
fn query_state_change(&mut self) -> Option<State>
The tokenizer will call this after emitting any tag. This allows the tree builder to change the tokenizer's state. By default no state changes occur.
Implementors
impl<Handle, Sink> TokenSink for TreeBuilder<Handle, Sink> where Handle: Clone, Sink: TreeSink<Handle=Handle>