Trait html5ever_ext::NodeExt [] [src]

pub trait NodeExt: Sized + Minify {
    fn validate_children_and_remove_comments_and_processing_instructions(
        &self,
        context: &Path
    ) -> Result<(), HtmlError>;
fn parent(&self) -> Option<Self>;
fn first_child(&self) -> Option<Self>;
fn is_inter_element_whitespace_comment_or_processing_instruction(
        &self
    ) -> bool; fn previous_sibling(
        &self,
        skip_inter_element_whitespace_comment_or_processing_instructions: bool
    ) -> Option<Self> { ... }
fn next_sibling(
        &self,
        skip_inter_element_whitespace_comment_or_processing_instructions: bool
    ) -> Option<Self> { ... } }

This trait adds additional methods to a a HTML DOM node.

Required Methods

Validated a HTML DOM node, removes any child comments and processing instructions.

Returns the parent of this node. Returns None if there is no parent. Ordinarily, the 'root' node is of type 'Document'. The :root CSS pseudo-element matches the first html element node child of the root node of type 'Document', not 'Document' itself.

Returns the first child if extant, which may be an element, text node (or, if not preprocessed, a comment or processing instruction)

Used for determining siblings.

Provided Methods

Returns the previous sibling, or None if this is the first sibling

Returns the next sibling, or None if this is the last sibling

Implementations on Foreign Types

impl NodeExt for Rc<Node>
[src]

[src]

[src]

[src]

[src]

[src]

[src]

Implementors