Skip to content

fromWindow ​

ts
function Rect.fromWindow(): Rect

Creates a rectangle representing the browser window's viewport dimensions.

Example ​

ts
Rect.fromWindow();
// { left: 0, top: 0, width: 1920, height: 1080 }