clj-chrome-devtools.commands.overlay
This domain provides various functionality related to drawing atop the inspected page.
disable
(disable)
(disable {:as params, :keys []})
(disable connection {:as params, :keys []})
Disables domain notifications.
enable
(enable)
(enable {:as params, :keys []})
(enable connection {:as params, :keys []})
Enables domain notifications.
get-grid-highlight-objects-for-test
(get-grid-highlight-objects-for-test)
(get-grid-highlight-objects-for-test {:as params, :keys [node-ids]})
(get-grid-highlight-objects-for-test connection {:as params, :keys [node-ids]})
For Persistent Grid testing.
Parameters map keys:
Key | Description |
---|---|
:node-ids | Ids of the node to get highlight object for. |
Return map keys:
Key | Description |
---|---|
:highlights | Grid Highlight data for the node ids provided. |
get-highlight-object-for-test
(get-highlight-object-for-test)
(get-highlight-object-for-test {:as params, :keys [node-id include-distance include-style color-format show-accessibility-info]})
(get-highlight-object-for-test connection {:as params, :keys [node-id include-distance include-style color-format show-accessibility-info]})
For testing.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to get highlight object for. |
:include-distance | Whether to include distance info. (optional) |
:include-style | Whether to include style info. (optional) |
:color-format | The color format to get config with (default: hex). (optional) |
:show-accessibility-info | Whether to show accessibility info (default: true). (optional) |
Return map keys:
Key | Description |
---|---|
:highlight | Highlight data for the node. |
get-source-order-highlight-object-for-test
(get-source-order-highlight-object-for-test)
(get-source-order-highlight-object-for-test {:as params, :keys [node-id]})
(get-source-order-highlight-object-for-test connection {:as params, :keys [node-id]})
For Source Order Viewer testing.
Parameters map keys:
Key | Description |
---|---|
:node-id | Id of the node to highlight. |
Return map keys:
Key | Description |
---|---|
:highlight | Source order highlight data for the node id provided. |
hide-highlight
(hide-highlight)
(hide-highlight {:as params, :keys []})
(hide-highlight connection {:as params, :keys []})
Hides any highlight.
highlight-frame
(highlight-frame)
(highlight-frame {:as params, :keys [frame-id content-color content-outline-color]})
(highlight-frame connection {:as params, :keys [frame-id content-color content-outline-color]})
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.
Parameters map keys:
Key | Description |
---|---|
:frame-id | Identifier of the frame to highlight. |
:content-color | The content box highlight fill color (default: transparent). (optional) |
:content-outline-color | The content box highlight outline color (default: transparent). (optional) |
highlight-node
(highlight-node)
(highlight-node {:as params, :keys [highlight-config node-id backend-node-id object-id selector]})
(highlight-node connection {:as params, :keys [highlight-config node-id backend-node-id object-id selector]})
Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
Parameters map keys:
Key | Description |
---|---|
:highlight-config | A descriptor for the highlight appearance. |
:node-id | Identifier of the node to highlight. (optional) |
:backend-node-id | Identifier of the backend node to highlight. (optional) |
:object-id | JavaScript object id of the node to be highlighted. (optional) |
:selector | Selectors to highlight relevant nodes. (optional) |
highlight-quad
(highlight-quad)
(highlight-quad {:as params, :keys [quad color outline-color]})
(highlight-quad connection {:as params, :keys [quad color outline-color]})
Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
Parameters map keys:
Key | Description |
---|---|
:quad | Quad to highlight |
:color | The highlight fill color (default: transparent). (optional) |
:outline-color | The highlight outline color (default: transparent). (optional) |
highlight-rect
(highlight-rect)
(highlight-rect {:as params, :keys [x y width height color outline-color]})
(highlight-rect connection {:as params, :keys [x y width height color outline-color]})
Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
Parameters map keys:
Key | Description |
---|---|
:x | X coordinate |
:y | Y coordinate |
:width | Rectangle width |
:height | Rectangle height |
:color | The highlight fill color (default: transparent). (optional) |
:outline-color | The highlight outline color (default: transparent). (optional) |
highlight-source-order
(highlight-source-order)
(highlight-source-order {:as params, :keys [source-order-config node-id backend-node-id object-id]})
(highlight-source-order connection {:as params, :keys [source-order-config node-id backend-node-id object-id]})
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.
Parameters map keys:
Key | Description |
---|---|
:source-order-config | A descriptor for the appearance of the overlay drawing. |
:node-id | Identifier of the node to highlight. (optional) |
:backend-node-id | Identifier of the backend node to highlight. (optional) |
:object-id | JavaScript object id of the node to be highlighted. (optional) |
set-inspect-mode
(set-inspect-mode)
(set-inspect-mode {:as params, :keys [mode highlight-config]})
(set-inspect-mode connection {:as params, :keys [mode highlight-config]})
Enters the ‘inspect’ mode. In this mode, elements that user is hovering over are highlighted. Backend then generates ‘inspectNodeRequested’ event upon element selection.
Parameters map keys:
Key | Description |
---|---|
:mode | Set an inspection mode. |
:highlight-config | A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled |
== false`. (optional)
set-paused-in-debugger-message
(set-paused-in-debugger-message)
(set-paused-in-debugger-message {:as params, :keys [message]})
(set-paused-in-debugger-message connection {:as params, :keys [message]})
Parameters map keys:
Key | Description |
---|---|
:message | The message to display, also triggers resume and step over controls. (optional) |
set-show-ad-highlights
(set-show-ad-highlights)
(set-show-ad-highlights {:as params, :keys [show]})
(set-show-ad-highlights connection {:as params, :keys [show]})
Highlights owner element of all frames detected to be ads.
Parameters map keys:
Key | Description |
---|---|
:show | True for showing ad highlights |
set-show-container-query-overlays
(set-show-container-query-overlays)
(set-show-container-query-overlays {:as params, :keys [container-query-highlight-configs]})
(set-show-container-query-overlays connection {:as params, :keys [container-query-highlight-configs]})
Parameters map keys:
Key | Description |
---|---|
:container-query-highlight-configs | An array of node identifiers and descriptors for the highlight appearance. |
set-show-debug-borders
(set-show-debug-borders)
(set-show-debug-borders {:as params, :keys [show]})
(set-show-debug-borders connection {:as params, :keys [show]})
Requests that backend shows debug borders on layers
Parameters map keys:
Key | Description |
---|---|
:show | True for showing debug borders |
set-show-flex-overlays
(set-show-flex-overlays)
(set-show-flex-overlays {:as params, :keys [flex-node-highlight-configs]})
(set-show-flex-overlays connection {:as params, :keys [flex-node-highlight-configs]})
Parameters map keys:
Key | Description |
---|---|
:flex-node-highlight-configs | An array of node identifiers and descriptors for the highlight appearance. |
set-show-fps-counter
(set-show-fps-counter)
(set-show-fps-counter {:as params, :keys [show]})
(set-show-fps-counter connection {:as params, :keys [show]})
Requests that backend shows the FPS counter
Parameters map keys:
Key | Description |
---|---|
:show | True for showing the FPS counter |
set-show-grid-overlays
(set-show-grid-overlays)
(set-show-grid-overlays {:as params, :keys [grid-node-highlight-configs]})
(set-show-grid-overlays connection {:as params, :keys [grid-node-highlight-configs]})
Highlight multiple elements with the CSS Grid overlay.
Parameters map keys:
Key | Description |
---|---|
:grid-node-highlight-configs | An array of node identifiers and descriptors for the highlight appearance. |
set-show-hinge
(set-show-hinge)
(set-show-hinge {:as params, :keys [hinge-config]})
(set-show-hinge connection {:as params, :keys [hinge-config]})
Add a dual screen device hinge
Parameters map keys:
Key | Description |
---|---|
:hinge-config | hinge data, null means hideHinge (optional) |
set-show-hit-test-borders
(set-show-hit-test-borders)
(set-show-hit-test-borders {:as params, :keys [show]})
(set-show-hit-test-borders connection {:as params, :keys [show]})
Deprecated, no longer has any effect.
Parameters map keys:
Key | Description |
---|---|
:show | True for showing hit-test borders |
set-show-isolated-elements
(set-show-isolated-elements)
(set-show-isolated-elements {:as params, :keys [isolated-element-highlight-configs]})
(set-show-isolated-elements connection {:as params, :keys [isolated-element-highlight-configs]})
Show elements in isolation mode with overlays.
Parameters map keys:
Key | Description |
---|---|
:isolated-element-highlight-configs | An array of node identifiers and descriptors for the highlight appearance. |
set-show-layout-shift-regions
(set-show-layout-shift-regions)
(set-show-layout-shift-regions {:as params, :keys [result]})
(set-show-layout-shift-regions connection {:as params, :keys [result]})
Requests that backend shows layout shift regions
Parameters map keys:
Key | Description |
---|---|
:result | True for showing layout shift regions |
set-show-paint-rects
(set-show-paint-rects)
(set-show-paint-rects {:as params, :keys [result]})
(set-show-paint-rects connection {:as params, :keys [result]})
Requests that backend shows paint rectangles
Parameters map keys:
Key | Description |
---|---|
:result | True for showing paint rectangles |
set-show-scroll-bottleneck-rects
(set-show-scroll-bottleneck-rects)
(set-show-scroll-bottleneck-rects {:as params, :keys [show]})
(set-show-scroll-bottleneck-rects connection {:as params, :keys [show]})
Requests that backend shows scroll bottleneck rects
Parameters map keys:
Key | Description |
---|---|
:show | True for showing scroll bottleneck rects |
set-show-scroll-snap-overlays
(set-show-scroll-snap-overlays)
(set-show-scroll-snap-overlays {:as params, :keys [scroll-snap-highlight-configs]})
(set-show-scroll-snap-overlays connection {:as params, :keys [scroll-snap-highlight-configs]})
Parameters map keys:
Key | Description |
---|---|
:scroll-snap-highlight-configs | An array of node identifiers and descriptors for the highlight appearance. |
set-show-viewport-size-on-resize
(set-show-viewport-size-on-resize)
(set-show-viewport-size-on-resize {:as params, :keys [show]})
(set-show-viewport-size-on-resize connection {:as params, :keys [show]})
Paints viewport size upon main frame resize.
Parameters map keys:
Key | Description |
---|---|
:show | Whether to paint size or not. |
set-show-web-vitals
(set-show-web-vitals)
(set-show-web-vitals {:as params, :keys [show]})
(set-show-web-vitals connection {:as params, :keys [show]})
Request that backend shows an overlay with web vital metrics.
Parameters map keys:
Key | Description |
---|---|
:show | null |