Package io.webfolder.cdp.command
Interface Overlay
public interface Overlay
This domain provides various functionality related to drawing atop the inspected page.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
disable()
Disables domain notifications.void
enable()
Enables domain notifications.void
Hides any highlight.void
highlightFrame
(String frameId) Deprecated.void
highlightFrame
(String frameId, RGBA contentColor, RGBA contentOutlineColor) Deprecated.void
highlightNode
(HighlightConfig highlightConfig) Highlights DOM node with given id or with the given JavaScript object wrapper.void
highlightNode
(HighlightConfig highlightConfig, Integer nodeId, Integer backendNodeId, String objectId, String selector) Highlights DOM node with given id or with the given JavaScript object wrapper.void
highlightQuad
(List<Double> quad) Highlights given quad.void
highlightQuad
(List<Double> quad, RGBA color, RGBA outlineColor) Highlights given quad.void
highlightRect
(Integer x, Integer y, Integer width, Integer height) Highlights given rectangle.void
Highlights given rectangle.void
highlightSourceOrder
(SourceOrderConfig sourceOrderConfig) Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper.void
highlightSourceOrder
(SourceOrderConfig sourceOrderConfig, Integer nodeId, Integer backendNodeId, String objectId) Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper.void
setInspectMode
(InspectMode mode) Enters the 'inspect' mode.void
setInspectMode
(InspectMode mode, HighlightConfig highlightConfig) Enters the 'inspect' mode.void
void
setPausedInDebuggerMessage
(String message) void
setShowAdHighlights
(Boolean show) Highlights owner element of all frames detected to be ads.void
setShowContainerQueryOverlays
(List<ContainerQueryHighlightConfig> containerQueryHighlightConfigs) void
setShowDebugBorders
(Boolean show) Requests that backend shows debug borders on layersvoid
setShowFlexOverlays
(List<FlexNodeHighlightConfig> flexNodeHighlightConfigs) void
setShowFPSCounter
(Boolean show) Requests that backend shows the FPS countervoid
setShowGridOverlays
(List<GridNodeHighlightConfig> gridNodeHighlightConfigs) Highlight multiple elements with the CSS Grid overlay.void
Add a dual screen device hingevoid
setShowHinge
(HingeConfig hingeConfig) Add a dual screen device hingevoid
setShowHitTestBorders
(Boolean show) Deprecated.void
setShowIsolatedElements
(List<IsolatedElementHighlightConfig> isolatedElementHighlightConfigs) Show elements in isolation mode with overlays.void
setShowLayoutShiftRegions
(Boolean result) Requests that backend shows layout shift regionsvoid
setShowPaintRects
(Boolean result) Requests that backend shows paint rectanglesvoid
Requests that backend shows scroll bottleneck rectsvoid
setShowScrollSnapOverlays
(List<ScrollSnapHighlightConfig> scrollSnapHighlightConfigs) void
Paints viewport size upon main frame resize.void
setShowWebVitals
(Boolean show) Request that backend shows an overlay with web vital metrics.
-
Method Details
-
disable
void disable()Disables domain notifications. -
enable
void enable()Enables domain notifications. -
hideHighlight
void hideHighlight()Hides any highlight. -
highlightFrame
Deprecated.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:
frameId
- Identifier of the frame to highlight.
-
highlightFrame
Deprecated.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:
frameId
- Identifier of the frame to highlight.contentColor
- The content box highlight fill color (default: transparent).contentOutlineColor
- The content box highlight outline color (default: transparent).
-
highlightNode
Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.- Parameters:
highlightConfig
- A descriptor for the highlight appearance.
-
highlightNode
void highlightNode(HighlightConfig highlightConfig, Integer nodeId, Integer backendNodeId, String objectId, String selector) Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.- Parameters:
highlightConfig
- A descriptor for the highlight appearance.nodeId
- Identifier of the node to highlight.backendNodeId
- Identifier of the backend node to highlight.objectId
- JavaScript object id of the node to be highlighted.selector
- Selectors to highlight relevant nodes.
-
highlightQuad
Highlights given quad. Coordinates are absolute with respect to the main frame viewport.- Parameters:
quad
- Quad to highlight
-
highlightQuad
Highlights given quad. Coordinates are absolute with respect to the main frame viewport.- Parameters:
quad
- Quad to highlightcolor
- The highlight fill color (default: transparent).outlineColor
- The highlight outline color (default: transparent).
-
highlightRect
Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.- Parameters:
x
- X coordinatey
- Y coordinatewidth
- Rectangle widthheight
- Rectangle height
-
highlightRect
void highlightRect(Integer x, Integer y, Integer width, Integer height, RGBA color, RGBA outlineColor) Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.- Parameters:
x
- X coordinatey
- Y coordinatewidth
- Rectangle widthheight
- Rectangle heightcolor
- The highlight fill color (default: transparent).outlineColor
- The highlight outline color (default: transparent).
-
highlightSourceOrder
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:
sourceOrderConfig
- A descriptor for the appearance of the overlay drawing.
-
highlightSourceOrder
void highlightSourceOrder(SourceOrderConfig sourceOrderConfig, Integer nodeId, Integer backendNodeId, String objectId) 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:
sourceOrderConfig
- A descriptor for the appearance of the overlay drawing.nodeId
- Identifier of the node to highlight.backendNodeId
- Identifier of the backend node to highlight.objectId
- JavaScript object id of the node to be highlighted.
-
setInspectMode
Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.- Parameters:
mode
- Set an inspection mode.
-
setInspectMode
Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.- Parameters:
mode
- Set an inspection mode.highlightConfig
- A descriptor for the highlight appearance of hovered-over nodes. May be omitted if enabled == false.
-
setPausedInDebuggerMessage
void setPausedInDebuggerMessage() -
setPausedInDebuggerMessage
-
setShowAdHighlights
Highlights owner element of all frames detected to be ads.- Parameters:
show
- True for showing ad highlights
-
setShowContainerQueryOverlays
void setShowContainerQueryOverlays(List<ContainerQueryHighlightConfig> containerQueryHighlightConfigs) -
setShowDebugBorders
Requests that backend shows debug borders on layers- Parameters:
show
- True for showing debug borders
-
setShowFPSCounter
Requests that backend shows the FPS counter- Parameters:
show
- True for showing the FPS counter
-
setShowFlexOverlays
-
setShowGridOverlays
Highlight multiple elements with the CSS Grid overlay.- Parameters:
gridNodeHighlightConfigs
- An array of node identifiers and descriptors for the highlight appearance.
-
setShowHinge
void setShowHinge()Add a dual screen device hinge -
setShowHinge
Add a dual screen device hinge- Parameters:
hingeConfig
- hinge data, null means hideHinge
-
setShowHitTestBorders
Deprecated.Deprecated, no longer has any effect.- Parameters:
show
- True for showing hit-test borders
-
setShowIsolatedElements
Show elements in isolation mode with overlays.- Parameters:
isolatedElementHighlightConfigs
- An array of node identifiers and descriptors for the highlight appearance.
-
setShowLayoutShiftRegions
Requests that backend shows layout shift regions- Parameters:
result
- True for showing layout shift regions
-
setShowPaintRects
Requests that backend shows paint rectangles- Parameters:
result
- True for showing paint rectangles
-
setShowScrollBottleneckRects
Requests that backend shows scroll bottleneck rects- Parameters:
show
- True for showing scroll bottleneck rects
-
setShowScrollSnapOverlays
-
setShowViewportSizeOnResize
Paints viewport size upon main frame resize.- Parameters:
show
- Whether to paint size or not.
-
setShowWebVitals
Request that backend shows an overlay with web vital metrics.
-