Package io.webfolder.cdp.command
Interface OverlayAsync
public interface OverlayAsync
This domain provides various functionality related to drawing atop the inspected page.
-
Method Summary
Modifier and TypeMethodDescriptiondisable()
Disables domain notifications.enable()
Enables domain notifications.Hides any highlight.highlightFrame
(String frameId) Deprecated.highlightFrame
(String frameId, RGBA contentColor, RGBA contentOutlineColor) Deprecated.highlightNode
(HighlightConfig highlightConfig) Highlights DOM node with given id or with the given JavaScript object wrapper.highlightNode
(HighlightConfig highlightConfig, Integer nodeId, Integer backendNodeId, String objectId, String selector) Highlights DOM node with given id or with the given JavaScript object wrapper.highlightQuad
(List<Double> quad) Highlights given quad.highlightQuad
(List<Double> quad, RGBA color, RGBA outlineColor) Highlights given quad.highlightRect
(Integer x, Integer y, Integer width, Integer height) Highlights given rectangle.Highlights given rectangle.highlightSourceOrder
(SourceOrderConfig sourceOrderConfig) Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper.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.setInspectMode
(InspectMode mode) Enters the 'inspect' mode.setInspectMode
(InspectMode mode, HighlightConfig highlightConfig) Enters the 'inspect' mode.setPausedInDebuggerMessage
(String message) setShowAdHighlights
(Boolean show) Highlights owner element of all frames detected to be ads.setShowContainerQueryOverlays
(List<ContainerQueryHighlightConfig> containerQueryHighlightConfigs) setShowDebugBorders
(Boolean show) Requests that backend shows debug borders on layerssetShowFlexOverlays
(List<FlexNodeHighlightConfig> flexNodeHighlightConfigs) setShowFPSCounter
(Boolean show) Requests that backend shows the FPS countersetShowGridOverlays
(List<GridNodeHighlightConfig> gridNodeHighlightConfigs) Highlight multiple elements with the CSS Grid overlay.Add a dual screen device hingesetShowHinge
(HingeConfig hingeConfig) Add a dual screen device hingesetShowHitTestBorders
(Boolean show) Deprecated.setShowIsolatedElements
(List<IsolatedElementHighlightConfig> isolatedElementHighlightConfigs) Show elements in isolation mode with overlays.setShowLayoutShiftRegions
(Boolean result) Requests that backend shows layout shift regionssetShowPaintRects
(Boolean result) Requests that backend shows paint rectanglesRequests that backend shows scroll bottleneck rectssetShowScrollSnapOverlays
(List<ScrollSnapHighlightConfig> scrollSnapHighlightConfigs) Paints viewport size upon main frame resize.setShowWebVitals
(Boolean show) Request that backend shows an overlay with web vital metrics.
-
Method Details
-
disable
CompletableFuture<Void> disable()Disables domain notifications. -
enable
CompletableFuture<Void> enable()Enables domain notifications. -
hideHighlight
CompletableFuture<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 CompletableFuture<Void> highlightFrame(String frameId, RGBA contentColor, RGBA contentOutlineColor) 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
CompletableFuture<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
CompletableFuture<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
CompletableFuture<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
CompletableFuture<Void> setPausedInDebuggerMessage() -
setPausedInDebuggerMessage
-
setShowAdHighlights
Highlights owner element of all frames detected to be ads.- Parameters:
show
- True for showing ad highlights
-
setShowContainerQueryOverlays
CompletableFuture<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
CompletableFuture<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
CompletableFuture<Void> setShowIsolatedElements(List<IsolatedElementHighlightConfig> isolatedElementHighlightConfigs) 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
CompletableFuture<Void> setShowScrollSnapOverlays(List<ScrollSnapHighlightConfig> scrollSnapHighlightConfigs) -
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.
-