Trait webkit2gtk_webextension::prelude::DOMNodeExt
source · [−]pub trait DOMNodeExt: 'static {
Show 48 methods
fn append_child(
&self,
newChild: &impl IsA<DOMNode>
) -> Result<DOMNode, Error>;
fn clone_node(&self, deep: bool) -> Result<DOMNode, Error>;
fn clone_node_with_error(&self, deep: bool) -> Result<DOMNode, Error>;
fn compare_document_position(&self, other: &impl IsA<DOMNode>) -> c_ushort;
fn contains(&self, other: &impl IsA<DOMNode>) -> bool;
fn base_uri(&self) -> Option<GString>;
fn child_nodes(&self) -> Option<DOMNodeList>;
fn first_child(&self) -> Option<DOMNode>;
fn last_child(&self) -> Option<DOMNode>;
fn local_name(&self) -> Option<GString>;
fn namespace_uri(&self) -> Option<GString>;
fn next_sibling(&self) -> Option<DOMNode>;
fn node_name(&self) -> Option<GString>;
fn node_type(&self) -> c_ushort;
fn node_value(&self) -> Option<GString>;
fn owner_document(&self) -> Option<DOMDocument>;
fn parent_element(&self) -> Option<DOMElement>;
fn parent_node(&self) -> Option<DOMNode>;
fn prefix(&self) -> Option<GString>;
fn previous_sibling(&self) -> Option<DOMNode>;
fn text_content(&self) -> Option<GString>;
fn has_child_nodes(&self) -> bool;
fn insert_before(
&self,
newChild: &impl IsA<DOMNode>,
refChild: Option<&impl IsA<DOMNode>>
) -> Result<DOMNode, Error>;
fn is_default_namespace(&self, namespaceURI: &str) -> bool;
fn is_equal_node(&self, other: &impl IsA<DOMNode>) -> bool;
fn is_same_node(&self, other: &impl IsA<DOMNode>) -> bool;
fn is_supported(&self, feature: &str, version: &str) -> bool;
fn lookup_namespace_uri(&self, prefix: &str) -> Option<GString>;
fn lookup_prefix(&self, namespaceURI: &str) -> Option<GString>;
fn normalize(&self);
fn remove_child(
&self,
oldChild: &impl IsA<DOMNode>
) -> Result<DOMNode, Error>;
fn replace_child(
&self,
newChild: &impl IsA<DOMNode>,
oldChild: &impl IsA<DOMNode>
) -> Result<DOMNode, Error>;
fn set_node_value(&self, value: &str) -> Result<(), Error>;
fn set_prefix(&self, value: &str) -> Result<(), Error>;
fn set_text_content(&self, value: &str) -> Result<(), Error>;
fn connect_base_uri_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_child_nodes_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_first_child_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_last_child_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_next_sibling_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_node_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_node_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_node_value_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_owner_document_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_parent_element_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_parent_node_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_previous_sibling_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_text_content_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}
Expand description
Trait containing all DOMNode
methods.
Implementors
DOMAttr
, DOMCharacterData
, DOMDocumentFragment
, DOMDocumentType
, DOMDocument
, DOMElement
, DOMEntityReference
, DOMNode
Required Methods
sourcefn clone_node_with_error(&self, deep: bool) -> Result<DOMNode, Error>
fn clone_node_with_error(&self, deep: bool) -> Result<DOMNode, Error>
Available on crate feature
v2_14
only.sourcefn compare_document_position(&self, other: &impl IsA<DOMNode>) -> c_ushort
fn compare_document_position(&self, other: &impl IsA<DOMNode>) -> c_ushort
sourcefn child_nodes(&self) -> Option<DOMNodeList>
fn child_nodes(&self) -> Option<DOMNodeList>
sourcefn first_child(&self) -> Option<DOMNode>
fn first_child(&self) -> Option<DOMNode>
sourcefn last_child(&self) -> Option<DOMNode>
fn last_child(&self) -> Option<DOMNode>
sourcefn local_name(&self) -> Option<GString>
fn local_name(&self) -> Option<GString>
Deprecated since 2.14
Use DOMAttrExt::local_name()
or DOMElementExt::local_name()
instead.
Returns
A gchar
sourcefn namespace_uri(&self) -> Option<GString>
fn namespace_uri(&self) -> Option<GString>
Deprecated since 2.14
Use DOMAttrExt::namespace_uri()
or DOMElementExt::namespace_uri()
instead.
Returns
A gchar
sourcefn next_sibling(&self) -> Option<DOMNode>
fn next_sibling(&self) -> Option<DOMNode>
sourcefn node_value(&self) -> Option<GString>
fn node_value(&self) -> Option<GString>
sourcefn owner_document(&self) -> Option<DOMDocument>
fn owner_document(&self) -> Option<DOMDocument>
sourcefn parent_element(&self) -> Option<DOMElement>
fn parent_element(&self) -> Option<DOMElement>
sourcefn parent_node(&self) -> Option<DOMNode>
fn parent_node(&self) -> Option<DOMNode>
sourcefn previous_sibling(&self) -> Option<DOMNode>
fn previous_sibling(&self) -> Option<DOMNode>
sourcefn text_content(&self) -> Option<GString>
fn text_content(&self) -> Option<GString>
sourcefn has_child_nodes(&self) -> bool
fn has_child_nodes(&self) -> bool
sourcefn insert_before(
&self,
newChild: &impl IsA<DOMNode>,
refChild: Option<&impl IsA<DOMNode>>
) -> Result<DOMNode, Error>
fn insert_before(
&self,
newChild: &impl IsA<DOMNode>,
refChild: Option<&impl IsA<DOMNode>>
) -> Result<DOMNode, Error>
sourcefn is_default_namespace(&self, namespaceURI: &str) -> bool
fn is_default_namespace(&self, namespaceURI: &str) -> bool
sourcefn is_equal_node(&self, other: &impl IsA<DOMNode>) -> bool
fn is_equal_node(&self, other: &impl IsA<DOMNode>) -> bool
sourcefn is_same_node(&self, other: &impl IsA<DOMNode>) -> bool
fn is_same_node(&self, other: &impl IsA<DOMNode>) -> bool
sourcefn is_supported(&self, feature: &str, version: &str) -> bool
fn is_supported(&self, feature: &str, version: &str) -> bool
Deprecated since 2.22
Use JavaScriptCore API instead
feature
A gchar
version
A gchar
Returns
A gboolean
sourcefn lookup_namespace_uri(&self, prefix: &str) -> Option<GString>
fn lookup_namespace_uri(&self, prefix: &str) -> Option<GString>
sourcefn lookup_prefix(&self, namespaceURI: &str) -> Option<GString>
fn lookup_prefix(&self, namespaceURI: &str) -> Option<GString>
sourcefn normalize(&self)
fn normalize(&self)
Deprecated since 2.22
Use JavaScriptCore API instead