pub struct DomNode { /* private fields */ }experimental and DOMSnapshot and CSS and DOM and DOMDebugger and Page only.Expand description
A Node in the DOM tree.
Implementations§
Source§impl DomNode
impl DomNode
pub fn builder() -> DomNodeBuilder
Sourcepub fn node_value(&self) -> &str
pub fn node_value(&self) -> &str
Node’s nodeValue.
Sourcepub fn text_value(&self) -> Option<&String>
pub fn text_value(&self) -> Option<&String>
Only set for textarea elements, contains the text value.
Sourcepub fn input_value(&self) -> Option<&String>
pub fn input_value(&self) -> Option<&String>
Only set for input elements, contains the input’s associated text value.
Sourcepub fn input_checked(&self) -> Option<&bool>
pub fn input_checked(&self) -> Option<&bool>
Only set for radio and checkbox input elements, indicates if the element has been checked
Sourcepub fn option_selected(&self) -> Option<&bool>
pub fn option_selected(&self) -> Option<&bool>
Only set for option elements, indicates if the element has been selected
Sourcepub fn backend_node_id(&self) -> &BackendNodeId
pub fn backend_node_id(&self) -> &BackendNodeId
Node’s id, corresponds to DOM.Node.backendNodeId.
Sourcepub fn child_node_indexes(&self) -> Option<&Vec<u32>>
pub fn child_node_indexes(&self) -> Option<&Vec<u32>>
The indexes of the node’s child nodes in the domNodes array returned by getSnapshot, if
any.
Sourcepub fn attributes(&self) -> Option<&Vec<NameValue>>
pub fn attributes(&self) -> Option<&Vec<NameValue>>
Attributes of an Element node.
Sourcepub fn pseudo_element_indexes(&self) -> Option<&Vec<u32>>
pub fn pseudo_element_indexes(&self) -> Option<&Vec<u32>>
Indexes of pseudo elements associated with this node in the domNodes array returned by
getSnapshot, if any.
Sourcepub fn layout_node_index(&self) -> Option<&u32>
pub fn layout_node_index(&self) -> Option<&u32>
The index of the node’s related layout tree node in the layoutTreeNodes array returned by
getSnapshot, if any.
Sourcepub fn document_url(&self) -> Option<&String>
pub fn document_url(&self) -> Option<&String>
Document URL that Document or FrameOwner node points to.
Sourcepub fn base_url(&self) -> Option<&String>
pub fn base_url(&self) -> Option<&String>
Base URL that Document or FrameOwner node uses for URL completion.
Sourcepub fn content_language(&self) -> Option<&String>
pub fn content_language(&self) -> Option<&String>
Only set for documents, contains the document’s content language.
Sourcepub fn document_encoding(&self) -> Option<&String>
pub fn document_encoding(&self) -> Option<&String>
Only set for documents, contains the document’s character set encoding.
Sourcepub fn frame_id(&self) -> Option<&FrameId>
pub fn frame_id(&self) -> Option<&FrameId>
Frame ID for frame owner elements and also for the document node.
Sourcepub fn content_document_index(&self) -> Option<&u32>
pub fn content_document_index(&self) -> Option<&u32>
The index of a frame owner element’s content document in the domNodes array returned by
getSnapshot, if any.
Sourcepub fn pseudo_type(&self) -> Option<&PseudoType>
pub fn pseudo_type(&self) -> Option<&PseudoType>
Type of a pseudo element node.
Sourcepub fn shadow_root_type(&self) -> Option<&ShadowRootType>
pub fn shadow_root_type(&self) -> Option<&ShadowRootType>
Shadow root type.
Sourcepub fn is_clickable(&self) -> Option<&bool>
pub fn is_clickable(&self) -> Option<&bool>
Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
Sourcepub fn event_listeners(&self) -> Option<&Vec<EventListener>>
pub fn event_listeners(&self) -> Option<&Vec<EventListener>>
Details of the node’s event listeners, if any.
Sourcepub fn current_source_url(&self) -> Option<&String>
pub fn current_source_url(&self) -> Option<&String>
The selected url for nodes with a srcset attribute.
Sourcepub fn origin_url(&self) -> Option<&String>
pub fn origin_url(&self) -> Option<&String>
The url of the script (if any) that generates this node.
Sourcepub fn scroll_offset_x(&self) -> Option<&f64>
pub fn scroll_offset_x(&self) -> Option<&f64>
Scroll offsets, set when this node is a Document.