Skip to main content

Module overlay

Module overlay 

Source
Expand description

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

Method names for the Overlay domain, for use with CdpClient::call.

This domain is experimental and may change without notice.

Constants§

DISABLE
Disables domain notifications.
ENABLE
Enables domain notifications.
GET_GRID_HIGHLIGHT_OBJECTS_FOR_TEST
For Persistent Grid testing.
GET_HIGHLIGHT_OBJECT_FOR_TEST
For testing.
GET_SOURCE_ORDER_HIGHLIGHT_OBJECT_FOR_TEST
For Source Order Viewer testing.
HIDE_HIGHLIGHT
Hides any highlight.
HIGHLIGHT_FRAME
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.
HIGHLIGHT_NODE
Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
HIGHLIGHT_QUAD
Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
HIGHLIGHT_RECT
Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. Issue: the method does not handle device pixel ratio (DPR) correctly. The coordinates currently have to be adjusted by the client if DPR is not 1 (see crbug.com/437807128).
HIGHLIGHT_SOURCE_ORDER
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.
SET_INSPECT_MODE
Enters the ‘inspect’ mode. In this mode, elements that user is hovering over are highlighted. Backend then generates ‘inspectNodeRequested’ event upon element selection.
SET_PAUSED_IN_DEBUGGER_MESSAGE
Overlay.setPausedInDebuggerMessage
SET_SHOW_AD_HIGHLIGHTS
Highlights owner element of all frames detected to be ads.
SET_SHOW_CONTAINER_QUERY_OVERLAYS
Overlay.setShowContainerQueryOverlays
SET_SHOW_DEBUG_BORDERS
Requests that backend shows debug borders on layers
SET_SHOW_DISPLAY_CUTOUT
Add a display cutout overlay.
SET_SHOW_FLEX_OVERLAYS
Overlay.setShowFlexOverlays
SET_SHOW_FPS_COUNTER
Requests that backend shows the FPS counter
SET_SHOW_GRID_OVERLAYS
Highlight multiple elements with the CSS Grid overlay.
SET_SHOW_HINGE
Add a dual screen device hinge
SET_SHOW_HIT_TEST_BORDERS
Deprecated, no longer has any effect.
SET_SHOW_INSPECTED_ELEMENT_ANCHOR
Overlay.setShowInspectedElementAnchor
SET_SHOW_ISOLATED_ELEMENTS
Show elements in isolation mode with overlays.
SET_SHOW_LAYOUT_SHIFT_REGIONS
Requests that backend shows layout shift regions
SET_SHOW_PAINT_RECTS
Requests that backend shows paint rectangles
SET_SHOW_SCROLL_BOTTLENECK_RECTS
Requests that backend shows scroll bottleneck rects
SET_SHOW_SCROLL_SNAP_OVERLAYS
Overlay.setShowScrollSnapOverlays
SET_SHOW_VIEWPORT_SIZE_ON_RESIZE
Paints viewport size upon main frame resize.
SET_SHOW_WEB_VITALS
Deprecated, no longer has any effect.
SET_SHOW_WINDOW_CONTROLS_OVERLAY
Show Window Controls Overlay for PWA