Skip to main content
Module

x/puppeteer/mod.ts>Viewport

A port of puppeteer running on Deno
Latest
interface Viewport
Re-export
import { type Viewport } from "https://deno.land/x/puppeteer@16.2.0/mod.ts";

Sets the viewport of the page.

Properties

width: number

The page width in pixels.

height: number

The page height in pixels.

optional
deviceScaleFactor: number

Specify device scale factor. See devicePixelRatio for more info.

optional
isMobile: boolean

Whether the meta viewport tag is taken into account.

optional
isLandscape: boolean

Specifies if the viewport is in landscape mode.

optional
hasTouch: boolean

Specify if the viewport supports touch events.