pub(crate) trait TraversalHandler<'dom> {
// Required methods
fn handle_text(
&mut self,
info: &NodeAndStyleInfo<'dom>,
text: Cow<'dom, str>,
);
fn handle_element(
&mut self,
info: &NodeAndStyleInfo<'dom>,
display: DisplayGeneratingBox,
contents: Contents,
box_slot: BoxSlot<'dom>,
);
// Provided methods
fn enter_display_contents(&mut self, _: SharedInlineStyles) { ... }
fn leave_display_contents(&mut self) { ... }
}
Required Methods§
fn handle_text(&mut self, info: &NodeAndStyleInfo<'dom>, text: Cow<'dom, str>)
Sourcefn handle_element(
&mut self,
info: &NodeAndStyleInfo<'dom>,
display: DisplayGeneratingBox,
contents: Contents,
box_slot: BoxSlot<'dom>,
)
fn handle_element( &mut self, info: &NodeAndStyleInfo<'dom>, display: DisplayGeneratingBox, contents: Contents, box_slot: BoxSlot<'dom>, )
Or pseudo-element
Provided Methods§
Sourcefn enter_display_contents(&mut self, _: SharedInlineStyles)
fn enter_display_contents(&mut self, _: SharedInlineStyles)
Notify the handler that we are about to recurse into a display: contents
element.
Sourcefn leave_display_contents(&mut self)
fn leave_display_contents(&mut self)
Notify the handler that we have finished a display: contents
element.