Skip to main content
Version: 19.1.0

Viewport interface

Sets the viewport of the page.

Signature:

export interface Viewport

Properties

PropertyModifiersTypeDescription
deviceScaleFactor?number(Optional) Specify device scale factor. See devicePixelRatio for more info.
hasTouch?boolean(Optional) Specify if the viewport supports touch events.
heightnumberThe page height in pixels.
isLandscape?boolean(Optional) Specifies if the viewport is in landscape mode.
isMobile?boolean(Optional) Whether the meta viewport tag is taken into account.
widthnumberThe page width in pixels.