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

Properties

width: integer

Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.

height: integer

Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.

deviceScaleFactor: number

Overriding device scale factor value. 0 disables the override.

mobile: boolean

Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.

optional
scale: number

Scale to apply to resulting view image.

optional
screenWidth: integer

Overriding screen width value in pixels (minimum 0, maximum 10000000).

optional
screenHeight: integer

Overriding screen height value in pixels (minimum 0, maximum 10000000).

optional
positionX: integer

Overriding view X position on screen in pixels (minimum 0, maximum 10000000).

optional
positionY: integer

Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).

optional
dontSetVisibleSize: boolean

Do not set visible view size, rely upon explicit setVisibleSize call.

optional
screenOrientation: ScreenOrientation

Screen orientation override.

optional
viewport: Page.Viewport

If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.

optional
displayFeature: DisplayFeature

If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off.