The change event of the Screen interface fires on a specific screen when key geometry or display facts update. Learn which properties trigger it, how MDN listens via getScreenDetails(), how onchange compares to addEventListener, and how it differs from screen.orientation change—with five examples and try-it labs.
01
Kind
Instance event
02
Type
Event
03
Status
Experimental
04
Context
Secure (HTTPS)
05
Handler
onchange
06
API family
Window Management
Fundamentals
Introduction
Multi-monitor apps sometimes need to know when a display’s size, available area, color depth, or orientation changes—for example after docking a laptop or rotating a tablet used as a second screen.
The Window Management API exposes a change event on Screen objects for that. MDN’s examples usually get screens from window.getScreenDetails(), then listen on a specific screen in screens.
Do not confuse this with screen.orientation.addEventListener("change", …). That listens on ScreenOrientation. This page is about Screen’s own change event.
Concept
Understanding the Event
MDN: the change event of the Screen interface is fired on a specific screen when one or more of the following properties change on it:
The handler receives a normal Event. There is no dedicated “ScreenChangeEvent” with size fields—read properties on the Screen you subscribed to.
Compare
⚖️ Screen change vs orientationchange
Event
Target
Typical use
Screenchange
A Screen (often from getScreenDetails)
Multi-monitor / Window Management layout updates
ScreenOrientationchange
screen.orientation
Device rotate; read type / angle
Window Management
💻 Listening with getScreenDetails()
MDN’s example awaits window.getScreenDetails(), then attaches change to screens[0]. That call is permission-gated and may reject. Pair it with screen.isExtended when deciding whether a multi-screen UI is worth trying.
JavaScript
const firstScreen = (await window.getScreenDetails()).screens[0];
firstScreen.addEventListener("change", (event) => {
console.log("The first screen has changed.", event, firstScreen);
});
Cheat Sheet
⚡ Quick Reference
Goal
Code / note
Listen (MDN style)
screenObj.addEventListener("change", fn)
Handler property
screenObj.onchange = fn
Get screens
await window.getScreenDetails()
Triggers
width, height, avail*, colorDepth, orientation
MDN status
Experimental · Limited availability
Context
Secure (HTTPS / localhost)
Snapshot
🔍 At a Glance
Four facts about the Screen change event.
Event type
Event
Generic
Status
experimental
Not Baseline
Context
secure
HTTPS
API
Window Mgmt
Multi-screen
Hands-On
Examples Gallery
Examples follow MDN Screen: change event. Labs mostly feature-detect and explain availability—firing a real change often needs a supporting browser, permission, and a physical display change.
📚 Getting Started
Detect Window Management pieces before attaching listeners.
Example 1 — Feature-Detect Safely
Check secure context, getScreenDetails, and onchange on screen.
The Screen change event is Experimental and not Baseline. Prefer feature detection and a single-screen fallback. Logos use the shared browser-image-sprite.png sprite from this project.
✓ Experimental · Limited
Screen change
Window Management — fires when key Screen properties update.
LimitedNot Baseline
Google ChromeWindow Management / getScreenDetails path — check current versions
Partial / Check
Microsoft EdgeChromium Window Management support — verify permissions
Partial / Check
OperaFollow Chromium Window Management
Partial / Check
Mozilla FirefoxLimited / unavailable for this experimental path
Limited
Apple SafariDo not rely on Screen change yet
Limited / Avoid
Internet ExplorerNot supported
No
Screen changeExperimental
Bottom line: Use only behind feature detection on HTTPS. Catch getScreenDetails failures. For device rotation alone, prefer screen.orientation change.
Wrap Up
Conclusion
Screen change is an experimental Window Management event for when a specific screen’s size, available area, color depth, or orientation updates. Feature-detect, use HTTPS, handle getScreenDetails failures, and keep a fallback layout.
It is an experimental Window Management API event fired on a specific Screen when one or more of width, height, availWidth, availHeight, colorDepth, or orientation change on that screen.
MDN marks Screen: change as Experimental and Limited availability (not Baseline). It is not Deprecated or Non-standard. It also requires a secure context (HTTPS) in supporting browsers.
Use addEventListener("change", handler) or the onchange property on a Screen object—often one returned from window.getScreenDetails().screens.
A generic Event. Re-read the Screen properties you care about inside the handler; the event object itself has no special payload fields for the new values.
No. ScreenOrientation also has a change event on screen.orientation. Screen change is broader (size, available area, color depth, or orientation) and is part of Window Management.
The Window Management API needs permission/policy support. The Promise can reject (for example NotAllowedError). Always feature-detect and catch errors; keep a single-screen fallback.
Did you know?
MDN ties this event to the Window Management specification (api-screen-onchange-attribute. That is why demos often go through getScreenDetails() instead of assuming every browser fires change on plain window.screen the same way.