Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
interface Protocol.Page.VisualViewport
import { type Protocol } from "https://deno.land/x/puppeteer@14.1.1/vendor/puppeteer-core/puppeteer/api-docs-entry.d.ts";
const { VisualViewport } = Protocol.Page;

Visual viewport position, dimensions, and scale.

Properties

offsetX: number

Horizontal offset relative to the layout viewport (CSS pixels).

offsetY: number

Vertical offset relative to the layout viewport (CSS pixels).

pageX: number

Horizontal offset relative to the document (CSS pixels).

pageY: number

Vertical offset relative to the document (CSS pixels).

clientWidth: number

Width (CSS pixels), excludes scrollbar if present.

clientHeight: number

Height (CSS pixels), excludes scrollbar if present.

scale: number

Scale relative to the ideal viewport (size at width=device-width).

optional
zoom: number

Page zoom factor (CSS to device independent pixels ratio).