Skip to main content

capture

Function capture 

Source
pub fn capture(
    browser: &mut Browser,
    req: &CaptureRequest<'_>,
) -> Result<(Capture, Vec<u8>)>
Expand description

Capture a single image.

Order matters and is the whole trick: metrics are applied before navigation so the first layout already happens at the target size. Setting them afterwards produces a reflow, and anything that measured the viewport during initial layout is now wrong.