puppeteer/new-docs/puppeteer.protocol.dom.node.md
2020-07-13 14:01:35 +01:00

4.7 KiB

Home > puppeteer > Protocol > DOM > Node

Protocol.DOM.Node interface

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

Signature:

export interface Node 

Properties

Property Type Description
attributes string[] Attributes of the Element node in the form of flat array [name1, value1, name2, value2].
backendNodeId BackendNodeId The BackendNodeId for this node.
baseURL string Base URL that Document or FrameOwner node uses for URL completion.
childNodeCount integer Child count for Container nodes.
children Node[] Child nodes of this node when requested with children.
contentDocument Node Content document for frame owner elements.
distributedNodes BackendNode[] Distributed nodes for given insertion point.
documentURL string Document URL that Document or FrameOwner node points to.
frameId Page.FrameId Frame ID for frame owner elements.
importedDocument Node Import document for the HTMLImport links.
internalSubset string DocumentType's internalSubset.
isSVG boolean Whether the node is SVG.
localName string Node's localName.
name string Attr's name.
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.
nodeName string Node's nodeName.
nodeType integer Node's nodeType.
nodeValue string Node's nodeValue.
parentId NodeId The id of the parent node if any.
pseudoElements Node[] Pseudo elements associated with this node.
pseudoType PseudoType Pseudo element type for this node.
publicId string DocumentType's publicId.
shadowRoots Node[] Shadow root list for given element host.
shadowRootType ShadowRootType Shadow root type.
systemId string DocumentType's systemId.
templateContent Node Content document fragment for template elements.
value string Attr's value.
xmlVersion string Document's XML version in case of XML documents.