OverlayApi class
This domain provides various functionality related to drawing atop the inspected page.
Constructors
- OverlayApi(Client _client)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onInspectModeCanceled
→ Stream<
void> -
Fired when user cancels the inspect mode.
no setter
-
onInspectNodeRequested
→ Stream<
BackendNodeId> -
Fired when the node should be inspected. This happens after call to
setInspectModeor when user manually inspects an element.no setter -
onNodeHighlightRequested
→ Stream<
NodeId> -
Fired when the node should be highlighted. This happens after call to
setInspectMode.no setter -
onScreenshotRequested
→ Stream<
Viewport> -
Fired when user asks to capture screenshot of some area on the page.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
disable(
) → Future< void> - Disables domain notifications.
-
enable(
) → Future< void> - Enables domain notifications.
-
getGridHighlightObjectsForTest(
List< NodeId> nodeIds) → Future<Map< String, dynamic> > -
For Persistent Grid testing.
nodeIdsIds of the node to get highlight object for. Returns: Grid Highlight data for the node ids provided. -
getHighlightObjectForTest(
NodeId nodeId, {bool? includeDistance, bool? includeStyle, ColorFormat? colorFormat, bool? showAccessibilityInfo}) → Future< Map< String, dynamic> > -
For testing.
nodeIdId of the node to get highlight object for.includeDistanceWhether to include distance info.includeStyleWhether to include style info.colorFormatThe color format to get config with (default: hex).showAccessibilityInfoWhether to show accessibility info (default: true). Returns: Highlight data for the node. -
getSourceOrderHighlightObjectForTest(
NodeId nodeId) → Future< Map< String, dynamic> > -
For Source Order Viewer testing.
nodeIdId of the node to highlight. Returns: Source order highlight data for the node id provided. -
hideHighlight(
) → Future< void> - Hides any highlight.
-
highlightFrame(
FrameId frameId, {RGBA? contentColor, RGBA? contentOutlineColor}) → Future< void> -
Highlights owner element of the frame with given id.
Deprecated: Doesn't work reliably and cannot be fixed due to process
separation (the owner node might be in a different process). Determine
the owner node in the client and use highlightNode.
frameIdIdentifier of the frame to highlight.contentColorThe content box highlight fill color (default: transparent).contentOutlineColorThe content box highlight outline color (default: transparent). -
highlightNode(
HighlightConfig highlightConfig, {NodeId? nodeId, BackendNodeId? backendNodeId, RemoteObjectId? objectId, String? selector}) → Future< void> -
Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or
objectId must be specified.
highlightConfigA descriptor for the highlight appearance.nodeIdIdentifier of the node to highlight.backendNodeIdIdentifier of the backend node to highlight.objectIdJavaScript object id of the node to be highlighted.selectorSelectors to highlight relevant nodes. -
highlightQuad(
Quad quad, {RGBA? color, RGBA? outlineColor}) → Future< void> -
Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
quadQuad to highlightcolorThe highlight fill color (default: transparent).outlineColorThe highlight outline color (default: transparent). -
highlightRect(
int x, int y, int width, int height, {RGBA? color, RGBA? outlineColor}) → Future< void> -
Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
xX coordinateyY coordinatewidthRectangle widthheightRectangle heightcolorThe highlight fill color (default: transparent).outlineColorThe highlight outline color (default: transparent). -
highlightSourceOrder(
SourceOrderConfig sourceOrderConfig, {NodeId? nodeId, BackendNodeId? backendNodeId, RemoteObjectId? objectId}) → Future< void> -
Highlights the source order of the children of the DOM node with given id or with the given
JavaScript object wrapper. Either nodeId or objectId must be specified.
sourceOrderConfigA descriptor for the appearance of the overlay drawing.nodeIdIdentifier of the node to highlight.backendNodeIdIdentifier of the backend node to highlight.objectIdJavaScript object id of the node to be highlighted. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setInspectMode(
InspectMode mode, {HighlightConfig? highlightConfig}) → Future< void> -
Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted.
Backend then generates 'inspectNodeRequested' event upon element selection.
modeSet an inspection mode.highlightConfigA descriptor for the highlight appearance of hovered-over nodes. May be omitted ifenabled == false. -
setPausedInDebuggerMessage(
{String? message}) → Future< void> -
messageThe message to display, also triggers resume and step over controls. -
setShowAdHighlights(
bool show) → Future< void> -
Highlights owner element of all frames detected to be ads.
showTrue for showing ad highlights -
setShowContainerQueryOverlays(
List< ContainerQueryHighlightConfig> containerQueryHighlightConfigs) → Future<void> -
containerQueryHighlightConfigsAn array of node identifiers and descriptors for the highlight appearance. -
setShowDebugBorders(
bool show) → Future< void> -
Requests that backend shows debug borders on layers
showTrue for showing debug borders -
setShowFlexOverlays(
List< FlexNodeHighlightConfig> flexNodeHighlightConfigs) → Future<void> -
flexNodeHighlightConfigsAn array of node identifiers and descriptors for the highlight appearance. -
setShowFPSCounter(
bool show) → Future< void> -
Requests that backend shows the FPS counter
showTrue for showing the FPS counter -
setShowGridOverlays(
List< GridNodeHighlightConfig> gridNodeHighlightConfigs) → Future<void> -
Highlight multiple elements with the CSS Grid overlay.
gridNodeHighlightConfigsAn array of node identifiers and descriptors for the highlight appearance. -
setShowHinge(
{HingeConfig? hingeConfig}) → Future< void> -
Add a dual screen device hinge
hingeConfighinge data, null means hideHinge -
setShowHitTestBorders(
bool show) → Future< void> -
Deprecated, no longer has any effect.
showTrue for showing hit-test borders -
setShowIsolatedElements(
List< IsolatedElementHighlightConfig> isolatedElementHighlightConfigs) → Future<void> -
Show elements in isolation mode with overlays.
isolatedElementHighlightConfigsAn array of node identifiers and descriptors for the highlight appearance. -
setShowLayoutShiftRegions(
bool result) → Future< void> -
Requests that backend shows layout shift regions
resultTrue for showing layout shift regions -
setShowPaintRects(
bool result) → Future< void> -
Requests that backend shows paint rectangles
resultTrue for showing paint rectangles -
setShowScrollBottleneckRects(
bool show) → Future< void> -
Requests that backend shows scroll bottleneck rects
showTrue for showing scroll bottleneck rects -
setShowScrollSnapOverlays(
List< ScrollSnapHighlightConfig> scrollSnapHighlightConfigs) → Future<void> -
scrollSnapHighlightConfigsAn array of node identifiers and descriptors for the highlight appearance. -
setShowViewportSizeOnResize(
bool show) → Future< void> -
Paints viewport size upon main frame resize.
showWhether to paint size or not. -
setShowWebVitals(
bool show) → Future< void> - Deprecated, no longer has any effect.
-
setShowWindowControlsOverlay(
{WindowControlsOverlayConfig? windowControlsOverlayConfig}) → Future< void> -
Show Window Controls Overlay for PWA
windowControlsOverlayConfigWindow Controls Overlay data, null means hide Window Controls Overlay -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited