Trait aravis::DomNodeExt
source · pub trait DomNodeExt: 'static {
Show 17 methods
// Required methods
fn append_child<P: IsA<DomNode>>(&self, new_child: &P) -> Option<DomNode>;
fn changed(&self);
fn child_nodes(&self) -> Option<DomNodeList>;
fn first_child(&self) -> Option<DomNode>;
fn last_child(&self) -> Option<DomNode>;
fn next_sibling(&self) -> Option<DomNode>;
fn node_name(&self) -> Option<GString>;
fn node_type(&self) -> DomNodeType;
fn node_value(&self) -> Option<GString>;
fn owner_document(&self) -> Option<DomDocument>;
fn parent_node(&self) -> Option<DomNode>;
fn previous_sibling(&self) -> Option<DomNode>;
fn has_child_nodes(&self) -> bool;
fn insert_before<P: IsA<DomNode>, Q: IsA<DomNode>>(
&self,
new_child: &P,
ref_child: &Q
) -> Option<DomNode>;
fn remove_child<P: IsA<DomNode>>(&self, old_child: &P) -> Option<DomNode>;
fn replace_child<P: IsA<DomNode>, Q: IsA<DomNode>>(
&self,
new_child: &P,
old_child: &Q
) -> Option<DomNode>;
fn set_node_value(&self, new_value: &str);
}
Expand description
Trait containing all DomNode
methods.
Implementors
DomCharacterData
, DomDocumentFragment
, DomDocument
, DomElement
, DomNode
Required Methods§
fn changed(&self)
sourcefn child_nodes(&self) -> Option<DomNodeList>
fn child_nodes(&self) -> Option<DomNodeList>
Returns
a DomNodeList
, NULL on error.
sourcefn first_child(&self) -> Option<DomNode>
fn first_child(&self) -> Option<DomNode>
Returns
self
first child.
sourcefn last_child(&self) -> Option<DomNode>
fn last_child(&self) -> Option<DomNode>
Returns
self
last child.
sourcefn next_sibling(&self) -> Option<DomNode>
fn next_sibling(&self) -> Option<DomNode>
Returns
self
next sibling.
fn node_type(&self) -> DomNodeType
sourcefn node_value(&self) -> Option<GString>
fn node_value(&self) -> Option<GString>
sourcefn owner_document(&self) -> Option<DomDocument>
fn owner_document(&self) -> Option<DomDocument>
Returns
self
owner document.
sourcefn parent_node(&self) -> Option<DomNode>
fn parent_node(&self) -> Option<DomNode>
sourcefn previous_sibling(&self) -> Option<DomNode>
fn previous_sibling(&self) -> Option<DomNode>
Returns
self
previous sibling.
fn has_child_nodes(&self) -> bool
sourcefn insert_before<P: IsA<DomNode>, Q: IsA<DomNode>>(
&self,
new_child: &P,
ref_child: &Q
) -> Option<DomNode>
fn insert_before<P: IsA<DomNode>, Q: IsA<DomNode>>( &self, new_child: &P, ref_child: &Q ) -> Option<DomNode>
Inserts the node new_child
before the existing child node ref_child
. If
ref_child
is null, insert new_child
at the end of the list of children.
If the new_child
is already in the tree, it is first removed.
new_child
node to insert
ref_child
reference node, i.e., the node before which the new node must be inserted.
Returns
the inserted node.