Window screenLeft
Example
Return the x and y coordinates of the window:
let x = window.screenLeft;
let y = window.screenTop;
Try it Yourself »
Definition and Usage
The screenLeft
property returns the x (horizontal) position of a window, relative to the screen.
Syntax
window.screenLeft
Return Value
Type | Description |
A number | The x (horizontal) position of the window relative to the screen, in pixels. |
Browser Support
window.screenLeft
is supported in all modern browsers:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | 11 | Yes | Yes | Yes | Yes |
window.screenLeft
was not supported in Firefox before version 64 (Nov 2018).