Trait stdweb::web::INode [] [src]

pub trait INode: IEventTarget + FromReference {
    fn append_child<T: INode>(&self, child: &T) { ... }
    fn remove_child<T: INode>(&self, child: &T) -> Result<(), NotFoundError> { ... }
    fn clone_node(&self, kind: CloneKind) -> Self { ... }
    fn contains<T: INode>(&self, node: &T) -> bool { ... }
    fn insert_before<T: INode, U: INode>(
        &self,
        new_node: &T,
        reference_node: &U
    ) { ... } fn replace_child<T: INode, U: INode>(&self, new_child: &T, old_child: &U) { ... } fn parent_node(&self) -> Option<Node> { ... } fn first_child(&self) -> Option<Node> { ... } fn inner_text(&self) -> String { ... } fn text_content(&self) -> Option<String> { ... } fn set_text_content(&self, text: &str) { ... } fn child_nodes(&self) -> NodeList { ... } }

INode is an interface from which a number of DOM API object types inherit.

(JavaScript docs)

Provided Methods

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

If the given child is a reference to an existing node in the document then it is moved from its current position to the new position (there is no requirement to remove the node from its parent node before appending it to some other node).

(JavaScript docs)

Removes a child node from the DOM.

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

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

(JavaScript docs)

Replaces one hild node of the specified node with another.

(JavaScript docs)

Returns the parent of this node in the DOM tree.

(JavaScript docs)

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

(JavaScript docs)

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.

This feature was originally introduced by Internet Explorer, and was formally specified in the HTML standard in 2016 after being adopted by all major browser vendors.

(JavaScript docs)

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

(JavaScript docs)

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.

(JavaScript docs)

Returns a live collection of child nodes of this node.

(JavaScript docs)

Implementors