Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
interface Protocol.DOMSnapshot.DOMNode
import { type Protocol } from "https://deno.land/x/puppeteer@14.1.1/vendor/puppeteer-core/puppeteer/api-docs-entry.d.ts";
const { DOMNode } = Protocol.DOMSnapshot;

A Node in the DOM tree.

Properties

nodeType: integer

Node's nodeType.

nodeName: string

Node's nodeName.

nodeValue: string

Node's nodeValue.

optional
textValue: string

Only set for textarea elements, contains the text value.

optional
inputValue: string

Only set for input elements, contains the input's associated text value.

optional
inputChecked: boolean

Only set for radio and checkbox input elements, indicates if the element has been checked

optional
optionSelected: boolean

Only set for option elements, indicates if the element has been selected

backendNodeId: DOM.BackendNodeId

Node's id, corresponds to DOM.Node.backendNodeId.

optional
childNodeIndexes: integer[]

The indexes of the node's child nodes in the domNodes array returned by getSnapshot, if any.

optional
attributes: NameValue[]

Attributes of an Element node.

optional
pseudoElementIndexes: integer[]

Indexes of pseudo elements associated with this node in the domNodes array returned by getSnapshot, if any.

optional
layoutNodeIndex: integer

The index of the node's related layout tree node in the layoutTreeNodes array returned by getSnapshot, if any.

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
contentLanguage: string

Only set for documents, contains the document's content language.

optional
documentEncoding: string

Only set for documents, contains the document's character set encoding.

optional
publicId: string

DocumentType node's publicId.

optional
systemId: string

DocumentType node's systemId.

optional
frameId: Page.FrameId

Frame ID for frame owner elements and also for the document node.

optional
contentDocumentIndex: integer

The index of a frame owner element's content document in the domNodes array returned by getSnapshot, if any.

optional
pseudoType: DOM.PseudoType

Type of a pseudo element node.

optional
shadowRootType: DOM.ShadowRootType

Shadow root type.

optional
isClickable: boolean

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.

optional
eventListeners: DOMDebugger.EventListener[]

Details of the node's event listeners, if any.

optional
currentSourceURL: string

The selected url for nodes with a srcset attribute.

optional
originURL: string

The url of the script (if any) that generates this node.

optional
scrollOffsetX: number

Scroll offsets, set when this node is a Document.

optional
scrollOffsetY: number