viewport

Type: <object>
It sets browser visible area settings and device capabilities over the target url.

Interactive Code Editor

Test API requests with multiple programming languages. Edit code, execute requests, and view responses in real-time.

Establishing a custom viewport.
The default viewport values are provided by the default device. The viewport should be defined by:
  • width <number>: The page width in pixels
  • height <number>: The page height in pixels.
  • deviceScaleFactor <number>: Specify device scale factor.
  • isMobile <boolean>: Whether the meta viewport tag is taken into account.
  • hasTouch <boolean>: Specifies if viewport supports touch events.
  • isLandscape <boolean>: Specifies if viewport is in landscape mode.
If you just provide an incomplete set of viewport values, they will be merged with the default values:

Interactive Code Editor

Test API requests with multiple programming languages. Edit code, execute requests, and view responses in real-time.

Using the default viewport with lower device scale factor.
See device for using viewport presets.