1 out of 7 rated this helpful - Rate this topic

screen object

Contains information about the client's screen and rendering capabilities.

Standards information

 

 

Send comments about this topic to Microsoft

Build date: 3/14/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Redeclaration of const property
As a side effect, if you declare a JavaScript variable called screen on your page, you'll get a Redeclaration of const property error (IE9).
Multiple displays

The screen.width and screen.height properties return the resolution of the primary screen, no matter which screen the browser is in. This is more of an issue, when the two screens have different resolutions. Firefox, Opera, Safari, Chrome all seem to be returning the resolution of the screen that the browser is in.

Multiple displays

The screen object only contains data for the primary system screen. Information for any additional screens to which the desktop is extended is unavailable. For instance, if you have two screens, at 1280x1024 each positioned side-by-side, you might expect screen.availWidth to return 2560. Alas, it will return only 1280, which is the available width of the primary screen.

This makes positioning popup windows a bit of a pain if the browser isn't on the primary monitor.