Struct html5ever_ext::UnattachedNode [] [src]

pub struct UnattachedNode {
    pub local_name: LocalName,
    pub attributes: Vec<Attribute>,
    pub children: Vec<Either<String, UnattachedNode>>,
}

Represents the structure of nodes unattached to a DOM. Designed to make it easy to create an entire graph of nodes before adding it.

Fields

Local name of this node

Attributes of this node

The children of this node

Methods

impl UnattachedNode
[src]

[src]

Creates a HTML RcDom from this node as the 'html' root with a HTML5 DOCTYPE preceding it. Panics if the node is not called 'html'.

[src]

Creates a HTML document as a String from this node as the 'html' root with a HTML5 DOCTYPE preceding it. Panics if the node is not called 'html'.

[src]

Represents an empty element, such as

[src]

Represents an empty element with just attributes, such as

[src]

Represents an empty element with just attributes and text, such as

hello

[src]

Represents an empty element with just text, such as hello

[src]

Add an empty attribute.

[src]

Add an id attribute.

[src]

Add a title attribute.

[src]

Add an accesskey attribute.

[src]

Add a lang attribute.

[src]

Add a contenteditable attribute.

[src]

Add a spellcheck attribute.

[src]

Add a tabindex attribute.

[src]

Add a hidden attribute.

[src]

Add a contextmenu attribute.

[src]

Add a data attribute.

[src]

Add a draggable attribute.

[src]

Add a dir attribute.

[src]

Add a href attribute.

[src]

Add a class attribute.

[src]

Add a class attribute.

[src]

Add a class attribute from classes

[src]

Add classes irrespective of whether a class attribute exists or not.

[src]

Add a class attribute if it does not exist, or appends to an existing class attribute if it does

[src]

Add an attribute.

[src]

Add a child element.

[src]

Add a child text. If there is an existing child text element, appends its text to it.

[src]

Attach this node as a child of the document_node (ie as a root node)

[src]

Attach this node as a child of parent_node

[src]

Attach this node before the sibling_node

Trait Implementations

impl Debug for UnattachedNode
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for UnattachedNode
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> From<&'a str> for UnattachedNode
[src]

[src]

Performs the conversion.

impl From<LocalName> for UnattachedNode
[src]

[src]

Performs the conversion.

impl UnattachedNodeExt for UnattachedNode
[src]

[src]

Helper method to turn a node into a DOM

[src]

Helper method to turn a node into a HTML fragment

Auto Trait Implementations

impl !Send for UnattachedNode

impl !Sync for UnattachedNode