class method document.viewport.getWidth

View source on GitHub →

document.viewport.getWidth() → Number

Returns the width of the viewport.

Equivalent to calling document.viewport.getDimensions().width.