Trait FlagCDataNs

Source
pub trait FlagCDataNs {
    // Required methods
    fn set_is_in_html(&mut self, flag: bool);
    fn need_flag_hint(&self) -> bool;
}
Expand description

A scanner needs to implement this trait to know if it is_in_html_namespace. A parser tells scanner the current namespace through the trait’s method.

Required Methods§

Source

fn set_is_in_html(&mut self, flag: bool)

Sets the scanner’s is_in_html_namespace flag for CDATA. NB: Parser should call this method if necessary. See trait comment for details. https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state

Source

fn need_flag_hint(&self) -> bool

hint the parser if flagging is needed. Hint must be conservative. False alarm is acceptable but miss detection is not.

Implementors§

Source§

impl<'a, C: ErrorHandler> FlagCDataNs for Tokens<'a, C>