Web features explorer

Window management

Limited availability

The window.getScreenDetails() method gets information about the screens on a device, which you can use to place new windows on a specific screen with window.open().

Browser support

  • Chrome 111 Released on 2023-03-07
  • Chrome Android Not supported
  • Edge 111 Released on 2023-03-13
  • Firefox Not supported Bugs: 1928070
  • Firefox for Android Not supported
  • Safari Not supported
  • Safari on iOS Not supported

Need this feature?
Leave a 👍 on the feedback issue
Don't forget to also leave a comment explaining your specific use case.

MDN documentation

Specifications

Usage (according to Chrome Platform Status)

~0.040% of page loads. More data at chromestatus.com.

Developer use cases

  • Exam proctoring has grown in importance since the 2020 pandemic and it is far easier to effect this through a browser than through requiring download of additional client software. One of the core requirements of proctoring is the ability to detect the presence of external monitors. Therefore, this is a critical requirement in all browsers. Exam proctoring has grown in importance since the 2020 pandemic and it is far easier to effect this through a browser than through requiring download of additional client software. One of the core requirements of proctoring is the ability to detect the presence of external monitors. Therefore, this is a critical requirement in all browsers. [see original comment]
  • I need to open a secondary report window next to the main application. On a multi-monitor setup, it should open on another screen and use that screen’s available workspace. On a single screen, it should use the opposite half of the current screen—horizontally in landscape orientation or vertically in portrait orientation. This requires access to the available screens, their positions and dimensions, and identification of the screen containing the current window. I need to open a secondary report window next to the main application. On a multi-monitor setup, it should open on another screen and use that screen’s available workspace. On a single screen, it should use the opposite half of the current screen—horizontally in landscape orientation or vertically in portrait orientation. This requires access to the available screens, their positions and dimensions, and identification of the screen containing the current window. [see original comment]
  • I want to make a presentation "web-site" (instead of making an application in C/C++), so that it works cross-platform. For this, I need to have a controlling window and a window that is shown on a projector. I want this window to be full-screen. Most of my presentation features are automatic, but I can't get sound to work automatically, "for security reasons". (It really annoys me that browsers have been crippled, featuers been disabled over the years, so we can't make things work well any longer. -AT LEAST, all features should be present when opening a file://.../index.html and all files inside the same directory / subdirectories of the same directory). I'd very much like to be able to identify screens by hardware (which connector they're connected to), by size (already possible, unless someone changed resolution - changing resolution on the main screen is also a problem, especially when having 3 screens and the main screen is changed to a different monitor). I want to make a presentation "web-site" (instead of making an application in C/C++), so that it works cross-platform. For this, I need to have a controlling window and a window that is shown on a projector. I want this window to be full-screen. Most of my presentation features are automatic, but I can't get sound to work automatically, "for security reasons". (It really annoys me that browsers have been crippled, featuers been disabled over the years, so we can't make things work well any longer. -AT LEAST, all features should be present when opening a file://.../index.html and all files inside the same directory / subdirectories of the same directory). I'd very much like to be able to identify screens by hardware (which connector they're connected to), by size (already possible, unless someone changed resolution - changing resolution on the main screen is also a problem, especially when having 3 screens and the main screen is changed to a different monitor). [see original comment]