← Back to DOM domain

DOM.resolveNode

Resolves the JavaScript node object for a given NodeId or BackendNodeId.

Domain: DOM stable

Parameters

NameTypeDescription
nodeId (optional)NodeIdId of the node to resolve.
backendNodeId (optional)DOM.BackendNodeIdBackend identifier of the node to resolve.
objectGroup (optional)stringSymbolic group name that can be used to release multiple objects.
executionContextId (optional)Runtime.ExecutionContextIdExecution context in which to resolve the node.

Returns

NameTypeDescription
objectRuntime.RemoteObjectJavaScript object wrapper for given node.

Example Request

{
  "id": 1,
  "method": "DOM.resolveNode"
}

Example Response

{
  "id": 1,
  "result": {
    "object": {
      "type": "object",
      "objectId": "{\"injectedScriptId\":1,\"id\":3}"
    }
  }
}

Usage in Node.js

const result = await send('DOM.resolveNode');
console.log(result);
// {"object": {"type": "object", "objectId": "{\"injectedScriptId\":1,\"id\":3}"}}