Skip to main content

Node

Struct Node 

Source
pub struct Node {
Show 35 fields pub nodeId: NodeId, pub parentId: Option<NodeId>, pub backendNodeId: BackendNodeId, pub nodeType: i64, pub nodeName: String, pub localName: String, pub nodeValue: String, pub childNodeCount: Option<u64>, pub children: Option<Vec<Node>>, pub attributes: Option<Vec<String>>, pub documentURL: Option<String>, pub baseURL: Option<String>, pub publicId: Option<String>, pub systemId: Option<String>, pub internalSubset: Option<String>, pub xmlVersion: Option<String>, pub name: Option<String>, pub value: Option<String>, pub pseudoType: Option<PseudoType>, pub pseudoIdentifier: Option<String>, pub shadowRootType: Option<ShadowRootType>, pub frameId: Option<FrameId>, pub contentDocument: Option<Box<Node>>, pub shadowRoots: Option<Vec<Node>>, pub templateContent: Option<Box<Node>>, pub pseudoElements: Option<Vec<Node>>, pub importedDocument: Option<Box<Node>>, pub distributedNodes: Option<Vec<BackendNode>>, pub isSVG: Option<bool>, pub compatibilityMode: Option<CompatibilityMode>, pub assignedSlot: Option<BackendNode>, pub isScrollable: Option<bool>, pub affectedByStartingStyles: Option<bool>, pub adoptedStyleSheets: Option<Vec<StyleSheetId>>, pub adProvenance: Option<AdProvenance>,
}
Expand description

DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.

Fields§

§nodeId: NodeId

Node identifier that is passed into the rest of the DOM messages as the ‘nodeId’. Backend will only push node with given ‘id’ once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.

§parentId: Option<NodeId>

The id of the parent node if any.

§backendNodeId: BackendNodeId

The BackendNodeId for this node.

§nodeType: i64

‘Node’’s nodeType.

§nodeName: String

‘Node’’s nodeName.

§localName: String

‘Node’’s localName.

§nodeValue: String

‘Node’’s nodeValue.

§childNodeCount: Option<u64>

Child count for ‘Container’ nodes.

§children: Option<Vec<Node>>

Child nodes of this node when requested with children.

§attributes: Option<Vec<String>>

Attributes of the ‘Element’ node in the form of flat array ‘[name1, value1, name2, value2]’.

§documentURL: Option<String>

Document URL that ‘Document’ or ‘FrameOwner’ node points to.

§baseURL: Option<String>

Base URL that ‘Document’ or ‘FrameOwner’ node uses for URL completion.

§publicId: Option<String>

‘DocumentType’’s publicId.

§systemId: Option<String>

‘DocumentType’’s systemId.

§internalSubset: Option<String>

‘DocumentType’’s internalSubset.

§xmlVersion: Option<String>

‘Document’’s XML version in case of XML documents.

§name: Option<String>

‘Attr’’s name.

§value: Option<String>

‘Attr’’s value.

§pseudoType: Option<PseudoType>

Pseudo element type for this node.

§pseudoIdentifier: Option<String>

Pseudo element identifier for this node. Only present if there is a valid pseudoType.

§shadowRootType: Option<ShadowRootType>

Shadow root type.

§frameId: Option<FrameId>

Frame ID for frame owner elements.

§contentDocument: Option<Box<Node>>

Content document for frame owner elements.

§shadowRoots: Option<Vec<Node>>

Shadow root list for given element host.

§templateContent: Option<Box<Node>>

Content document fragment for template elements.

§pseudoElements: Option<Vec<Node>>

Pseudo elements associated with this node.

§importedDocument: Option<Box<Node>>

Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.

§distributedNodes: Option<Vec<BackendNode>>

Distributed nodes for given insertion point.

§isSVG: Option<bool>

Whether the node is SVG.

§compatibilityMode: Option<CompatibilityMode>§assignedSlot: Option<BackendNode>§isScrollable: Option<bool>§affectedByStartingStyles: Option<bool>§adoptedStyleSheets: Option<Vec<StyleSheetId>>§adProvenance: Option<AdProvenance>

Trait Implementations§

Source§

impl Clone for Node

Source§

fn clone(&self) -> Node

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Node

Source§

fn default() -> Node

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Node

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Node

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl UnsafeUnpin for Node

§

impl UnwindSafe for Node

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,