document.viewport

Methods

getDimensions
1.6.0

document.viewport.getDimensions() -> { width: Number, height: Number }

Returns the size of the viewport.

getHeight
1.6.0

document.viewport.getHeight() -> Number

Returns the height of the viewport.

getScrollOffsets
1.6.0

document.viewport.getScrollOffsets() -> [Number, Number] also accessible as { top: Number, left: Number }

Returns the viewport’s horizontal and vertical scroll offsets.

getWidth
1.6.0

document.viewport.getWidth() -> Number

Returns the width of the viewport.