pub struct RcDom {
pub document: Rc<Node>,
pub errors: Vec<Cow<'static, str>>,
pub quirks_mode: QuirksMode,
}
The DOM itself; the result of parsing.
Errors that occurred during parsing.
The document's quirks mode.
Returns the "default value" for a type. Read more
Consume this sink and return the overall result of parsing. Read more
Handle
is a reference to a DOM node. The tree builder requires that a Handle
implements Clone
to get another reference to the same node. Read more
Get a handle to the Document
node.
fn get_template_contents(&mut self, target: &Rc<Node>) -> Rc<Node> | |
Get a handle to a template's template contents. The tree builder promises this will never be called with something else than a template element. Read more
Set the document's quirks mode.
Do two handles refer to the same node?
fn elem_name(&self, target: &'a Rc<Node>) -> ExpandedName<'a> | |
fn create_element( &mut self, name: QualName, attrs: Vec<Attribute>, flags: ElementFlags ) -> Rc<Node> | |
fn create_pi( &mut self, target: Tendril<UTF8, NonAtomic>, data: Tendril<UTF8, NonAtomic> ) -> Rc<Node> | |
Create a Processing Instruction node.
fn append(&mut self, parent: &Rc<Node>, child: NodeOrText<Rc<Node>>) | |
Append a node as the last child of the given node. If this would produce adjacent sibling text nodes, it should concatenate the text instead. Read more
Append a node as the sibling immediately before the given node. Read more
When the insertion point is decided by the existence of a parent node of the element, we consider both possibilities and send the element which will be used if a parent node exists, along with the element to be used if there isn't one. Read more
fn append_doctype_to_document( &mut self, name: Tendril<UTF8, NonAtomic>, public_id: Tendril<UTF8, NonAtomic>, system_id: Tendril<UTF8, NonAtomic> ) | |
Append a DOCTYPE
element to the Document
node.
Add each attribute to the given element, if no attribute with that name already exists. The tree builder promises this will never be called with something else than an element. Read more
Detach the given node from its parent.
Remove all the children from node and append them to new_parent.
Returns true if the adjusted current node is an HTML integration point and the token is a start tag. Read more
Mark a HTML <script>
as "already started".
fn pop(&mut self, _node: &Self::Handle) | |
Indicate that a node was popped off the stack of open elements.
Associate the given form-associatable element with the form element
Called whenever the line number changes.
Indicate that a script
element is complete.
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more