Interface OverlayAsync


public interface OverlayAsync
This domain provides various functionality related to drawing atop the inspected page.
  • Method Details

    • disable

      Disables domain notifications.
    • enable

      Enables domain notifications.
    • hideHighlight

      CompletableFuture<Void> hideHighlight()
      Hides any highlight.
    • highlightFrame

      @Deprecated CompletableFuture<Void> highlightFrame(String frameId)
      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

      CompletableFuture<Void> highlightNode(HighlightConfig highlightConfig)
      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

      CompletableFuture<Void> highlightQuad(List<Double> quad)
      Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
      Parameters:
      quad - Quad to highlight
    • highlightQuad

      CompletableFuture<Void> highlightQuad(List<Double> quad, RGBA color, RGBA outlineColor)
      Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
      Parameters:
      quad - Quad to highlight
      color - The highlight fill color (default: transparent).
      outlineColor - The highlight outline color (default: transparent).
    • highlightRect

      CompletableFuture<Void> highlightRect(Integer x, Integer y, Integer width, Integer height)
      Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.
      Parameters:
      x - X coordinate
      y - Y coordinate
      width - Rectangle width
      height - 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 coordinate
      y - Y coordinate
      width - Rectangle width
      height - Rectangle height
      color - The highlight fill color (default: transparent).
      outlineColor - The highlight outline color (default: transparent).
    • highlightSourceOrder

      CompletableFuture<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. 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

      CompletableFuture<Void> setInspectMode(InspectMode mode)
      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

      CompletableFuture<Void> setInspectMode(InspectMode mode, HighlightConfig highlightConfig)
      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

      CompletableFuture<Void> setPausedInDebuggerMessage(String message)
    • setShowAdHighlights

      CompletableFuture<Void> setShowAdHighlights(Boolean show)
      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

      CompletableFuture<Void> setShowDebugBorders(Boolean show)
      Requests that backend shows debug borders on layers
      Parameters:
      show - True for showing debug borders
    • setShowFPSCounter

      CompletableFuture<Void> setShowFPSCounter(Boolean show)
      Requests that backend shows the FPS counter
      Parameters:
      show - True for showing the FPS counter
    • setShowFlexOverlays

      CompletableFuture<Void> setShowFlexOverlays(List<FlexNodeHighlightConfig> flexNodeHighlightConfigs)
    • setShowGridOverlays

      CompletableFuture<Void> setShowGridOverlays(List<GridNodeHighlightConfig> gridNodeHighlightConfigs)
      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

      CompletableFuture<Void> setShowHinge(HingeConfig hingeConfig)
      Add a dual screen device hinge
      Parameters:
      hingeConfig - hinge data, null means hideHinge
    • setShowHitTestBorders

      @Deprecated CompletableFuture<Void> setShowHitTestBorders(Boolean show)
      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

      CompletableFuture<Void> setShowLayoutShiftRegions(Boolean result)
      Requests that backend shows layout shift regions
      Parameters:
      result - True for showing layout shift regions
    • setShowPaintRects

      CompletableFuture<Void> setShowPaintRects(Boolean result)
      Requests that backend shows paint rectangles
      Parameters:
      result - True for showing paint rectangles
    • setShowScrollBottleneckRects

      CompletableFuture<Void> setShowScrollBottleneckRects(Boolean show)
      Requests that backend shows scroll bottleneck rects
      Parameters:
      show - True for showing scroll bottleneck rects
    • setShowScrollSnapOverlays

      CompletableFuture<Void> setShowScrollSnapOverlays(List<ScrollSnapHighlightConfig> scrollSnapHighlightConfigs)
    • setShowViewportSizeOnResize

      CompletableFuture<Void> setShowViewportSizeOnResize(Boolean show)
      Paints viewport size upon main frame resize.
      Parameters:
      show - Whether to paint size or not.
    • setShowWebVitals

      CompletableFuture<Void> setShowWebVitals(Boolean show)
      Request that backend shows an overlay with web vital metrics.