← Back to DOM domain
DOM.describeNode
Describes node given its id, does not require domain to be enabled. Does not start tracking any
objects, can be used for automation.
Domain: DOM
stable
Parameters
| Name | Type | Description |
nodeId (optional) | NodeId | Identifier of the node. |
backendNodeId (optional) | BackendNodeId | Identifier of the backend node. |
objectId (optional) | Runtime.RemoteObjectId | JavaScript object id of the node wrapper. |
depth (optional) | integer | The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the
entire subtree or provide an integer larger than 0. |
pierce (optional) | boolean | Whether or not iframes and shadow roots should be traversed when returning the subtree
(default is false). |
Returns
| Name | Type | Description |
node | Node | Node description. |
Example Request
{
"id": 1,
"method": "DOM.describeNode"
}
Example Response
{
"id": 1,
"result": {
"node": "node-value"
}
}
Usage in Node.js
const result = await send('DOM.describeNode');
console.log(result);
// {"node": "node-value"}