Viewport

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

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

The Viewport interface of the Viewport Segments API represents the device's viewport.

Instance properties

segments Read only Experimental

Returns an array of DOMRect objects representing the position and dimensions of each viewport segment within the overall display.

Specifications

Specification
CSS Viewport Module Level 1
# the-viewport-interface

Browser compatibility

See also