Trait style::dom::TDocument [] [src]

pub trait TDocument: Sized + Copy + Clone {
    type ConcreteNode: TNode<ConcreteDocument = Self>;
    fn as_node(&self) -> Self::ConcreteNode;
fn is_html_document(&self) -> bool;
fn quirks_mode(&self) -> QuirksMode; fn elements_with_id(
        &self,
        _id: &Atom
    ) -> Result<&[<Self::ConcreteNode as TNode>::ConcreteElement], ()> { ... } }

The TDocument trait, to represent a document node.

Associated Types

The concrete TNode type.

Required Methods

Get this document as a TNode.

Returns whether this document is an HTML document.

Returns the quirks mode of this document.

Provided Methods

Get a list of elements with a given ID in this document, sorted by document position.

Can return an error to signal that this list is not available, or also return an empty slice.

Implementors