mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
5.4 KiB
5.4 KiB
Home > puppeteer > Protocol > DOMSnapshot > DOMNode
Protocol.DOMSnapshot.DOMNode interface
A Node in the DOM tree.
Signature:
export interface DOMNode
Properties
| Property | Type | Description |
|---|---|---|
| attributes | NameValue[] | Attributes of an Element node. |
| backendNodeId | DOM.BackendNodeId | Node's id, corresponds to DOM.Node.backendNodeId. |
| baseURL | string | Base URL that Document or FrameOwner node uses for URL completion. |
| childNodeIndexes | integer[] | The indexes of the node's child nodes in the domNodes array returned by getSnapshot, if any. |
| contentDocumentIndex | integer | The index of a frame owner element's content document in the domNodes array returned by getSnapshot, if any. |
| contentLanguage | string | Only set for documents, contains the document's content language. |
| currentSourceURL | string | The selected url for nodes with a srcset attribute. |
| documentEncoding | string | Only set for documents, contains the document's character set encoding. |
| documentURL | string | Document URL that Document or FrameOwner node points to. |
| eventListeners | DOMDebugger.EventListener[] | Details of the node's event listeners, if any. |
| frameId | Page.FrameId | Frame ID for frame owner elements and also for the document node. |
| inputChecked | boolean | Only set for radio and checkbox input elements, indicates if the element has been checked |
| inputValue | string | Only set for input elements, contains the input's associated text value. |
| 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. |
| layoutNodeIndex | integer | The index of the node's related layout tree node in the layoutTreeNodes array returned by getSnapshot, if any. |
| nodeName | string | Node's nodeName. |
| nodeType | integer | Node's nodeType. |
| nodeValue | string | Node's nodeValue. |
| optionSelected | boolean | Only set for option elements, indicates if the element has been selected |
| originURL | string | The url of the script (if any) that generates this node. |
| pseudoElementIndexes | integer[] | Indexes of pseudo elements associated with this node in the domNodes array returned by getSnapshot, if any. |
| pseudoType | DOM.PseudoType | Type of a pseudo element node. |
| publicId | string | DocumentType node's publicId. |
| scrollOffsetX | number | Scroll offsets, set when this node is a Document. |
| scrollOffsetY | number | |
| shadowRootType | DOM.ShadowRootType | Shadow root type. |
| systemId | string | DocumentType node's systemId. |
| textValue | string | Only set for textarea elements, contains the text value. |