Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pptr/mod.ts>Protocol.DOM.Node

Headless Chrome Deno API
Latest
interface Protocol.DOM.Node
import { type Protocol } from "https://deno.land/x/pptr@1.2.0/mod.ts";
const { Node } = Protocol.DOM;

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

Properties

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.

optional
parentId: NodeId

The id of the parent node if any.

backendNodeId: BackendNodeId

The BackendNodeId for this node.

nodeType: integer

Node's nodeType.

nodeName: string

Node's nodeName.

localName: string

Node's localName.

nodeValue: string

Node's nodeValue.

optional
childNodeCount: integer

Child count for Container nodes.

optional
children: Node[]

Child nodes of this node when requested with children.

optional
attributes: string[]

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

optional
documentURL: string

Document URL that Document or FrameOwner node points to.

optional
baseURL: string

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

optional
publicId: string

DocumentType's publicId.

optional
systemId: string

DocumentType's systemId.

optional
internalSubset: string

DocumentType's internalSubset.

optional
xmlVersion: string

Document's XML version in case of XML documents.

optional
name: string

Attr's name.

optional
value: string

Attr's value.

optional
pseudoType: PseudoType

Pseudo element type for this node.

optional
shadowRootType: ShadowRootType

Shadow root type.

optional
frameId: Page.FrameId

Frame ID for frame owner elements.

optional
contentDocument: Node

Content document for frame owner elements.

optional
shadowRoots: Node[]

Shadow root list for given element host.

optional
templateContent: Node

Content document fragment for template elements.

optional
pseudoElements: Node[]

Pseudo elements associated with this node.

optional
importedDocument: Node

Import document for the HTMLImport links.

optional
distributedNodes: BackendNode[]

Distributed nodes for given insertion point.

optional
isSVG: boolean

Whether the node is SVG.