← Back to DOM domain

DOM.setInspectedNode

Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

Domain: DOM experimental

Parameters

NameTypeDescription
nodeIdNodeIdDOM node id to be accessible by means of $x command line API.

Example Request

{
  "id": 1,
  "method": "DOM.setInspectedNode",
  "params": {
    "nodeId": 1
  }
}

Example Response

{
  "id": 1,
  "result": {}
}

Usage in Node.js

const result = await send('DOM.setInspectedNode', {"nodeId": 1});
console.log(result);