Struct html5ever::rcdom::RcDom
[−]
[src]
pub struct RcDom { pub document: Handle, pub errors: Vec<Cow<'static, str>>, pub quirks_mode: QuirksMode, }
The DOM itself; the result of parsing.
Fields
document: Handle
The Document
itself.
errors: Vec<Cow<'static, str>>
Errors that occurred during parsing.
quirks_mode: QuirksMode
The document's quirks mode.
Trait Implementations
impl TreeSink for RcDom
[src]
type Output = Self
The overall result of parsing. Read more
fn finish(self) -> Self
Consume this sink and return the overall result of parsing. Read more
type Handle = Handle
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
fn parse_error(&mut self, msg: Cow<'static, str>)
Signal a parse error.
fn get_document(&mut self) -> Handle
Get a handle to the Document
node.
fn get_template_contents(&mut self, target: Handle) -> Handle
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
fn set_quirks_mode(&mut self, mode: QuirksMode)
Set the document's quirks mode.
fn same_node(&self, x: Handle, y: Handle) -> bool
Do two handles refer to the same node?
fn elem_name(&self, target: Handle) -> QualName
What is the name of this element? Read more
fn create_element(&mut self, name: QualName, attrs: Vec<Attribute>) -> Handle
Create an element. Read more
fn create_comment(&mut self, text: StrTendril) -> Handle
Create a comment node.
fn append(&mut self, parent: Handle, child: NodeOrText<Handle>)
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
fn append_before_sibling(&mut self,
sibling: Handle,
child: NodeOrText<Handle>)
-> Result<(), NodeOrText<Handle>>
sibling: Handle,
child: NodeOrText<Handle>)
-> Result<(), NodeOrText<Handle>>
Append a node as the sibling immediately before the given node. If that node has no parent, do nothing and return Err(new_node). Read more
fn append_doctype_to_document(&mut self,
name: StrTendril,
public_id: StrTendril,
system_id: StrTendril)
name: StrTendril,
public_id: StrTendril,
system_id: StrTendril)
Append a DOCTYPE
element to the Document
node.
fn add_attrs_if_missing(&mut self, target: Handle, attrs: Vec<Attribute>)
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
fn remove_from_parent(&mut self, target: Handle)
Detach the given node from its parent.
fn reparent_children(&mut self, node: Handle, new_parent: Handle)
Remove all the children from node and append them to new_parent.
fn mark_script_already_started(&mut self, target: Handle)
Mark a HTML <script>
element as "already started".
fn is_mathml_annotation_xml_integration_point(&self,
handle: Self::Handle)
-> bool
handle: Self::Handle)
-> bool