pub struct OverlayClient { /* private fields */ }Expand description
Client for Overlay domain commands.
Implementations§
Source§impl OverlayClient
impl OverlayClient
Sourcepub async fn disable(&self, session_id: Option<&str>) -> Result<Value, CdpError>
pub async fn disable(&self, session_id: Option<&str>) -> Result<Value, CdpError>
Disables domain notifications.
Sourcepub async fn enable(&self, session_id: Option<&str>) -> Result<Value, CdpError>
pub async fn enable(&self, session_id: Option<&str>) -> Result<Value, CdpError>
Enables domain notifications.
Sourcepub async fn get_highlight_object_for_test(
&self,
params: GetHighlightObjectForTestParams,
session_id: Option<&str>,
) -> Result<GetHighlightObjectForTestReturns, CdpError>
pub async fn get_highlight_object_for_test( &self, params: GetHighlightObjectForTestParams, session_id: Option<&str>, ) -> Result<GetHighlightObjectForTestReturns, CdpError>
For testing.
Sourcepub async fn get_grid_highlight_objects_for_test(
&self,
params: GetGridHighlightObjectsForTestParams,
session_id: Option<&str>,
) -> Result<GetGridHighlightObjectsForTestReturns, CdpError>
pub async fn get_grid_highlight_objects_for_test( &self, params: GetGridHighlightObjectsForTestParams, session_id: Option<&str>, ) -> Result<GetGridHighlightObjectsForTestReturns, CdpError>
For Persistent Grid testing.
Sourcepub async fn get_source_order_highlight_object_for_test(
&self,
params: GetSourceOrderHighlightObjectForTestParams,
session_id: Option<&str>,
) -> Result<GetSourceOrderHighlightObjectForTestReturns, CdpError>
pub async fn get_source_order_highlight_object_for_test( &self, params: GetSourceOrderHighlightObjectForTestParams, session_id: Option<&str>, ) -> Result<GetSourceOrderHighlightObjectForTestReturns, CdpError>
For Source Order Viewer testing.
Sourcepub async fn hide_highlight(
&self,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn hide_highlight( &self, session_id: Option<&str>, ) -> Result<Value, CdpError>
Hides any highlight.
Sourcepub async fn highlight_frame(
&self,
params: HighlightFrameParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn highlight_frame( &self, params: HighlightFrameParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
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.
Sourcepub async fn highlight_node(
&self,
params: HighlightNodeParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn highlight_node( &self, params: HighlightNodeParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.
Sourcepub async fn highlight_quad(
&self,
params: HighlightQuadParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn highlight_quad( &self, params: HighlightQuadParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Highlights given quad. Coordinates are absolute with respect to the main frame viewport.
Sourcepub async fn highlight_rect(
&self,
params: HighlightRectParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn highlight_rect( &self, params: HighlightRectParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
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).
Sourcepub async fn highlight_source_order(
&self,
params: HighlightSourceOrderParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn highlight_source_order( &self, params: HighlightSourceOrderParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
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.
Sourcepub async fn set_inspect_mode(
&self,
params: SetInspectModeParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_inspect_mode( &self, params: SetInspectModeParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Enters the ‘inspect’ mode. In this mode, elements that user is hovering over are highlighted. Backend then generates ‘inspectNodeRequested’ event upon element selection.
Sourcepub async fn set_show_ad_highlights(
&self,
params: SetShowAdHighlightsParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_ad_highlights( &self, params: SetShowAdHighlightsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Highlights owner element of all frames detected to be ads.
pub async fn set_paused_in_debugger_message( &self, params: SetPausedInDebuggerMessageParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Sourcepub async fn set_show_debug_borders(
&self,
params: SetShowDebugBordersParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_debug_borders( &self, params: SetShowDebugBordersParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Requests that backend shows debug borders on layers
Sourcepub async fn set_show_fps_counter(
&self,
params: SetShowFpsCounterParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_fps_counter( &self, params: SetShowFpsCounterParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Requests that backend shows the FPS counter
Sourcepub async fn set_show_grid_overlays(
&self,
params: SetShowGridOverlaysParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_grid_overlays( &self, params: SetShowGridOverlaysParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Highlight multiple elements with the CSS Grid overlay.
pub async fn set_show_flex_overlays( &self, params: SetShowFlexOverlaysParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
pub async fn set_show_scroll_snap_overlays( &self, params: SetShowScrollSnapOverlaysParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
pub async fn set_show_container_query_overlays( &self, params: SetShowContainerQueryOverlaysParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Sourcepub async fn set_show_paint_rects(
&self,
params: SetShowPaintRectsParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_paint_rects( &self, params: SetShowPaintRectsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Requests that backend shows paint rectangles
Sourcepub async fn set_show_layout_shift_regions(
&self,
params: SetShowLayoutShiftRegionsParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_layout_shift_regions( &self, params: SetShowLayoutShiftRegionsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Requests that backend shows layout shift regions
Sourcepub async fn set_show_scroll_bottleneck_rects(
&self,
params: SetShowScrollBottleneckRectsParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_scroll_bottleneck_rects( &self, params: SetShowScrollBottleneckRectsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Requests that backend shows scroll bottleneck rects
Sourcepub async fn set_show_hit_test_borders(
&self,
params: SetShowHitTestBordersParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_hit_test_borders( &self, params: SetShowHitTestBordersParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Deprecated, no longer has any effect.
Sourcepub async fn set_show_web_vitals(
&self,
params: SetShowWebVitalsParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_web_vitals( &self, params: SetShowWebVitalsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Deprecated, no longer has any effect.
Sourcepub async fn set_show_viewport_size_on_resize(
&self,
params: SetShowViewportSizeOnResizeParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_viewport_size_on_resize( &self, params: SetShowViewportSizeOnResizeParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Paints viewport size upon main frame resize.
Sourcepub async fn set_show_hinge(
&self,
params: SetShowHingeParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_hinge( &self, params: SetShowHingeParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Add a dual screen device hinge
Sourcepub async fn set_show_isolated_elements(
&self,
params: SetShowIsolatedElementsParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_isolated_elements( &self, params: SetShowIsolatedElementsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Show elements in isolation mode with overlays.
Sourcepub async fn set_show_window_controls_overlay(
&self,
params: SetShowWindowControlsOverlayParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_show_window_controls_overlay( &self, params: SetShowWindowControlsOverlayParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Show Window Controls Overlay for PWA