describeNode method
Future<Node>
describeNode({
- NodeId? nodeId,
- BackendNodeId? backendNodeId,
- RemoteObjectId? objectId,
- int? depth,
- bool? pierce,
Describes node given its id, does not require domain to be enabled. Does not start tracking any
objects, can be used for automation.
nodeId
Identifier of the node.
backendNodeId
Identifier of the backend node.
objectId
JavaScript object id of the node wrapper.
depth
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
Whether or not iframes and shadow roots should be traversed when returning the subtree
(default is false).
Returns: Node description.
Implementation
Future<Node> describeNode(
{NodeId? nodeId,
BackendNodeId? backendNodeId,
runtime.RemoteObjectId? objectId,
int? depth,
bool? pierce}) async {
var result = await _client.send('DOM.describeNode', {
if (nodeId != null) 'nodeId': nodeId,
if (backendNodeId != null) 'backendNodeId': backendNodeId,
if (objectId != null) 'objectId': objectId,
if (depth != null) 'depth': depth,
if (pierce != null) 'pierce': pierce,
});
return Node.fromJson(result['node'] as Map<String, dynamic>);
}