getLayersForNode method

Future<CSSLayerData> getLayersForNode(
  1. NodeId nodeId
)

Returns all layers parsed by the rendering engine for the tree scope of a node. Given a DOM element identified by nodeId, getLayersForNode returns the root layer for the nearest ancestor document or shadow root. The layer root contains the full layer tree for the tree scope and their ordering.

Implementation

Future<CSSLayerData> getLayersForNode(dom.NodeId nodeId) async {
  var result = await _client.send('CSS.getLayersForNode', {
    'nodeId': nodeId,
  });
  return CSSLayerData.fromJson(result['rootLayer'] as Map<String, dynamic>);
}