getSnapshot method
Returns a document snapshot, including the full DOM tree of the root node (including iframes,
template contents, and imported documents) in a flattened array, as well as layout and
white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
flattened.
computedStyleWhitelist
Whitelist of computed styles to return.
includeEventListeners
Whether or not to retrieve details of DOM listeners (default false).
includePaintOrder
Whether to determine and include the paint order index of LayoutTreeNodes (default false).
includeUserAgentShadowTree
Whether to include UA shadow tree in the snapshot (default false).
Implementation
@Deprecated('This command is deprecated')
Future<GetSnapshotResult> getSnapshot(List<String> computedStyleWhitelist,
{bool? includeEventListeners,
bool? includePaintOrder,
bool? includeUserAgentShadowTree}) async {
var result = await _client.send('DOMSnapshot.getSnapshot', {
'computedStyleWhitelist': [...computedStyleWhitelist],
if (includeEventListeners != null)
'includeEventListeners': includeEventListeners,
if (includePaintOrder != null) 'includePaintOrder': includePaintOrder,
if (includeUserAgentShadowTree != null)
'includeUserAgentShadowTree': includeUserAgentShadowTree,
});
return GetSnapshotResult.fromJson(result);
}