DOMSnapshotApi class
This domain facilitates obtaining document snapshots with DOM, layout, and style information.
Constructors
- DOMSnapshotApi(Client _client)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
captureSnapshot(
List< String> computedStyles, {bool? includePaintOrder, bool? includeDOMRects, bool? includeBlendedBackgroundColors, bool? includeTextColorOpacities}) → Future<CaptureSnapshotResult> -
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.
computedStylesWhitelist of computed styles to return.includePaintOrderWhether to include layout object paint orders into the snapshot.includeDOMRectsWhether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshotincludeBlendedBackgroundColorsWhether to include blended background colors in the snapshot (default: false). Blended background color is achieved by blending background colors of all elements that overlap with the current element.includeTextColorOpacitiesWhether to include text color opacity in the snapshot (default: false). An element might have the opacity property set that affects the text color of the element. The final text color opacity is computed based on the opacity of all overlapping elements. -
disable(
) → Future< void> - Disables DOM snapshot agent for the given page.
-
enable(
) → Future< void> - Enables DOM snapshot agent for the given page.
-
getSnapshot(
List< String> computedStyleWhitelist, {bool? includeEventListeners, bool? includePaintOrder, bool? includeUserAgentShadowTree}) → Future<GetSnapshotResult> -
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.
computedStyleWhitelistWhitelist of computed styles to return.includeEventListenersWhether or not to retrieve details of DOM listeners (default false).includePaintOrderWhether to determine and include the paint order index of LayoutTreeNodes (default false).includeUserAgentShadowTreeWhether to include UA shadow tree in the snapshot (default false). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited