Struct stdweb::web::Document [] [src]

pub struct Document(_);

The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree.

(JavaScript docs)

Methods

impl Document
[src]

Returns the first Element within the document that matches the specified selector, or group of selectors.

(JavaScript docs)

Returns a list of the elements within the document (using depth-first pre-order traversal of the document's nodes) that match the specified group of selectors.

(JavaScript docs)

Returns a reference to the element by its ID; the ID is a string which can be used to uniquely identify the element, found in the HTML id attribute.

(JavaScript docs)

In an HTML document, the Document.createElement() method creates the HTML element specified by tag, or an HTMLUnknownElement if tag isn't recognized. In other documents, it creates an element with a null namespace URI.

(JavaScript docs)

Creates a new text node.

(JavaScript docs)

Returns a Location object which contains information about the URL of the document and provides methods for changing that URL and loading another URL.

(JavaScript docs)

Trait Implementations

impl IEventTarget for Document
[src]

Adds given event handler to the list the list of event listeners for the specified EventTarget on which it's called. Read more

impl INode for Document
[src]

Adds a node to the end of the list of children of a specified parent node. Read more

Removes a child node from the DOM. Read more

Returns a duplicate of the node on which this method was called. Read more

Checks whenever a given node is a descendant of this one or not. Read more

Inserts the specified node before the reference node as a child of the current node. Read more

Replaces one hild node of the specified node with another. Read more

Returns the parent of this node in the DOM tree. Read more

Returns the node's first child in the tree, or None if the node is childless. Read more

A property which represents the "rendered" text content of a node and its descendants. It approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied to the clipboard. Read more

A property which represents the text content of a node and its descendants. Read more

Sets the text content of this node; calling thil removes all of node's children and replaces them with a single text node with the given value. Read more

Returns a live collection of child nodes of this node. Read more

impl Debug for Document
[src]

Formats the value using the given formatter.

impl Clone for Document
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl AsRef<Reference> for Document
[src]

Performs the conversion.

impl<T: TryInto<Reference>> TryFrom<T> for Document where
    T::Error: Into<Box<Error>>, 
[src]

The type returned in the event of a conversion error.

Performs the conversion.