getPlatformFontsForNode method

Future<List<PlatformFontUsage>> getPlatformFontsForNode(
  1. NodeId nodeId
)

Requests information about platform fonts which we used to render child TextNodes in the given node. Returns: Usage statistics for every employed platform font.

Implementation

Future<List<PlatformFontUsage>> getPlatformFontsForNode(
    dom.NodeId nodeId) async {
  var result = await _client.send('CSS.getPlatformFontsForNode', {
    'nodeId': nodeId,
  });
  return (result['fonts'] as List)
      .map((e) => PlatformFontUsage.fromJson(e as Map<String, dynamic>))
      .toList();
}