Skip to main content

The viewport object

Information about the current size of the canvas.

viewport contains information about the current size of the canvas.

Properties

height
number

The height of the canvas. This value increases as the layout increases vertically and includes content that must be scrolled into view.

width
number

The width of the canvas. This value is responsive to the horizontal space available.