pub struct CaptureSnapshotParams<'a> { /* private fields */ }Expand description
Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.
Implementations§
Source§impl<'a> CaptureSnapshotParams<'a>
impl<'a> CaptureSnapshotParams<'a>
Sourcepub fn builder(
computed_styles: Vec<Cow<'a, str>>,
) -> CaptureSnapshotParamsBuilder<'a>
pub fn builder( computed_styles: Vec<Cow<'a, str>>, ) -> CaptureSnapshotParamsBuilder<'a>
Creates a builder for this type with the required parameters:
computed_styles: Whitelist of computed styles to return.
Sourcepub fn computed_styles(&self) -> &[Cow<'a, str>]
pub fn computed_styles(&self) -> &[Cow<'a, str>]
Whitelist of computed styles to return.
Sourcepub fn include_paint_order(&self) -> Option<bool>
pub fn include_paint_order(&self) -> Option<bool>
Whether to include layout object paint orders into the snapshot.
Sourcepub fn include_dom_rects(&self) -> Option<bool>
pub fn include_dom_rects(&self) -> Option<bool>
Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
Sourcepub fn include_blended_background_colors(&self) -> Option<bool>
pub fn include_blended_background_colors(&self) -> Option<bool>
Whether to include blended background colors in the snapshot (default: false). Blended background color is achieved by blending background colors of all elements that overlap with the current element.
Sourcepub fn include_text_color_opacities(&self) -> Option<bool>
pub fn include_text_color_opacities(&self) -> Option<bool>
Whether to include text color opacity in the snapshot (default: false). An element might have the opacity property set that affects the text color of the element. The final text color opacity is computed based on the opacity of all overlapping elements.
Trait Implementations§
Source§impl<'a> CdpCommand<'a> for CaptureSnapshotParams<'a>
impl<'a> CdpCommand<'a> for CaptureSnapshotParams<'a>
Source§impl<'a> Clone for CaptureSnapshotParams<'a>
impl<'a> Clone for CaptureSnapshotParams<'a>
Source§fn clone(&self) -> CaptureSnapshotParams<'a>
fn clone(&self) -> CaptureSnapshotParams<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more