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 attach_child(
        &self,
        rc_dom: &mut RcDom,
        child: UnattachedNode
    ) -> Rc<Node>;
fn attach_sibling_before(
        &self,
        rc_dom: &mut RcDom,
        sibling_node: UnattachedNode
    ) -> Rc<Node>;
fn remove(&self, rc_dom: &mut RcDom);
fn move_node_children_to(&self, rc_dom: &mut RcDom, new_parent_node: &Self);
fn move_node_to(&self, rc_dom: &mut RcDom, new_parent_node: &Self);
fn move_node_before_sibling_of(
        &self,
        rc_dom: &mut RcDom,
        sibling_node: &Self
    );
fn append_new_element_to(
        &self,
        rc_dom: &mut RcDom,
        qualified_name: QualName,
        attributes: Vec<Attribute>
    ) -> Rc<Node>;
fn append_new_element_before_sibling_of(
        &self,
        rc_dom: &mut RcDom,
        qualified_name: QualName,
        attributes: Vec<Attribute>
    ) -> Rc<Node>;
fn append_new_comment_to(&self, rc_dom: &mut RcDom, comment: &str);
fn append_new_comment_before_sibling_of(
        &self,
        rc_dom: &mut RcDom,
        comment: &str
    );
fn append_new_processing_instruction_to(
        &self,
        rc_dom: &mut RcDom,
        target: &str,
        data: &str
    );
fn append_new_processing_instruction_before_sibling_of(
        &self,
        rc_dom: &mut RcDom,
        target: &str,
        data: &str
    );
fn append_text(&self, rc_dom: &mut RcDom, text: &str);
fn append_text_before_sibling_of(&self, rc_dom: &mut RcDom, text: &str); 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.

Used to attach an unattached child node to a parent

Used to attach an unattached sibling node to a sibling

Removes this node from its parent.

Moves a node's children to another parent node

Moves an existing element node to a parent node

Moves an existing element before a sibling node

Appends a new element node to a parent node

Appends a new element before a sibling node

Appends a new comment node to a parent node

Appends a new comment before a sibling node

Appends a new processing instruction node to a parent node

Appends a new processing instruction before a sibling node

Appends a text node to a parent node

Appends a text node before a sibling node

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]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Implementors