getNodeForLocation method

Future<GetNodeForLocationResult> getNodeForLocation(
  1. int x,
  2. int y, {
  3. bool? includeUserAgentShadowDOM,
  4. bool? ignorePointerEventsNone,
})

Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not. x X coordinate. y Y coordinate. includeUserAgentShadowDOM False to skip to the nearest non-UA shadow root ancestor (default: false). ignorePointerEventsNone Whether to ignore pointer-events: none on elements and hit test them.

Implementation

Future<GetNodeForLocationResult> getNodeForLocation(int x, int y,
    {bool? includeUserAgentShadowDOM, bool? ignorePointerEventsNone}) async {
  var result = await _client.send('DOM.getNodeForLocation', {
    'x': x,
    'y': y,
    if (includeUserAgentShadowDOM != null)
      'includeUserAgentShadowDOM': includeUserAgentShadowDOM,
    if (ignorePointerEventsNone != null)
      'ignorePointerEventsNone': ignorePointerEventsNone,
  });
  return GetNodeForLocationResult.fromJson(result);
}