requestChildNodes method

Future<void> requestChildNodes(
  1. NodeId nodeId, {
  2. int? depth,
  3. bool? pierce,
})

Requests that children of the node with given id are returned to the caller in form of setChildNodes events where not only immediate children are retrieved, but all children down to the specified depth. nodeId Id of the node to get children for. 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 sub-tree (default is false).

Implementation

Future<void> requestChildNodes(NodeId nodeId,
    {int? depth, bool? pierce}) async {
  await _client.send('DOM.requestChildNodes', {
    'nodeId': nodeId,
    if (depth != null) 'depth': depth,
    if (pierce != null) 'pierce': pierce,
  });
}