← Back to Accessibility domain

Accessibility.getAXNodeAndAncestors

Fetches a node and all ancestors up to and including the root. Requires `enable()` to have been called previously.

Domain: Accessibility experimental

Parameters

NameTypeDescription
nodeId (optional)DOM.NodeIdIdentifier of the node to get.
backendNodeId (optional)DOM.BackendNodeIdIdentifier of the backend node to get.
objectId (optional)Runtime.RemoteObjectIdJavaScript object id of the node wrapper to get.

Returns

NameTypeDescription
nodesarray

Example Request

{
  "id": 1,
  "method": "Accessibility.getAXNodeAndAncestors"
}

Example Response

{
  "id": 1,
  "result": {
    "nodes": []
  }
}

Usage in Node.js

const result = await send('Accessibility.getAXNodeAndAncestors');
console.log(result);
// {"nodes": []}