getPartialAXTree method
Future<List<AXNodeData> >
getPartialAXTree({
- NodeId? nodeId,
- BackendNodeId? backendNodeId,
- RemoteObjectId? objectId,
- bool? fetchRelatives,
Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists.
nodeId
Identifier of the node to get the partial accessibility tree for.
backendNodeId
Identifier of the backend node to get the partial accessibility tree for.
objectId
JavaScript object id of the node wrapper to get the partial accessibility tree for.
fetchRelatives
Whether to fetch this node's ancestors, siblings and children. Defaults to true.
Returns: The Accessibility.AXNode
for this DOM node, if it exists, plus its ancestors, siblings and
children, if requested.
Implementation
Future<List<AXNodeData>> getPartialAXTree({
dom.NodeId? nodeId,
dom.BackendNodeId? backendNodeId,
runtime.RemoteObjectId? objectId,
bool? fetchRelatives,
}) async {
var result = await _client.send('Accessibility.getPartialAXTree', {
if (nodeId != null) 'nodeId': nodeId,
if (backendNodeId != null) 'backendNodeId': backendNodeId,
if (objectId != null) 'objectId': objectId,
if (fetchRelatives != null) 'fetchRelatives': fetchRelatives,
});
return (result['nodes'] as List)
.map((e) => AXNodeData.fromJson(e as Map<String, dynamic>))
.toList();
}