Window.visualViewport

Experimental

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The visualViewport read-only property of the Window interface returns a VisualViewport object representing the visual viewport for a given window.

Syntax

var visualViewport = Window.visualViewport

Value

VisualViewport object.

Specifications

Specification
Visual Viewport API
# dom-window-visualviewport

Browser compatibility

BCD tables only load in the browser