OverlayDomain

This domain provides various functionality related to drawing atop the inspected page.

Official doc

Functions

Link copied to clipboard
suspend fun disable(): DisableResponse

Disables domain notifications.

Link copied to clipboard
suspend fun enable(): EnableResponse

Enables domain notifications.

Link copied to clipboard
fun events(): Flow<OverlayEvent>

Subscribes to all events related to this domain.

Link copied to clipboard

Hides any highlight.

Link copied to clipboard
inline suspend fun highlightFrame(frameId: FrameId, optionalArgs: HighlightFrameRequest.Builder.() -> Unit = {}): HighlightFrameResponse

Highlights owner element of the frame with given id. Deprecated: Doesn't work reliablity and cannot be fixed due to process separatation (the owner node might be in a different process). Determine the owner node in the client and use highlightNode.

Link copied to clipboard
inline suspend fun highlightNode(highlightConfig: HighlightConfig, optionalArgs: HighlightNodeRequest.Builder.() -> Unit = {}): HighlightNodeResponse

Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.

Link copied to clipboard
inline suspend fun highlightQuad(quad: Quad, optionalArgs: HighlightQuadRequest.Builder.() -> Unit = {}): HighlightQuadResponse

Highlights given quad. Coordinates are absolute with respect to the main frame viewport.

Link copied to clipboard
inline suspend fun highlightRect(x: Int, y: Int, width: Int, height: Int, optionalArgs: HighlightRectRequest.Builder.() -> Unit = {}): HighlightRectResponse

Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.

Link copied to clipboard

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.

Link copied to clipboard

Fired when user cancels the inspect mode.

Link copied to clipboard

Fired when the node should be inspected. This happens after call to setInspectMode or when user manually inspects an element.

Link copied to clipboard

Fired when the node should be highlighted. This happens after call to setInspectMode.

Link copied to clipboard

Fired when user asks to capture screenshot of some area on the page.

Link copied to clipboard

Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.

Link copied to clipboard

Highlights owner element of all frames detected to be ads.

Link copied to clipboard

Requests that backend shows debug borders on layers

Link copied to clipboard

Requests that backend shows the FPS counter

Link copied to clipboard

Highlight multiple elements with the CSS Grid overlay.

Link copied to clipboard
inline suspend fun setShowHinge(optionalArgs: SetShowHingeRequest.Builder.() -> Unit = {}): SetShowHingeResponse

Add a dual screen device hinge

Link copied to clipboard
Link copied to clipboard

Show elements in isolation mode with overlays.

Link copied to clipboard
Link copied to clipboard

Requests that backend shows paint rectangles

Link copied to clipboard

Request that backend shows an overlay with web vital metrics.