Skip to main content
Version: Next

Viewport interface

Sets the viewport of the page.


export interface Viewport


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.