Screen orientationchange is a legacy instance event that fired when the device orientation changed (MDN). It is a generic Event with no special payload.
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
Syntax
Listen for orientationchange. Start with this line.
Show the old API.addEventListener("orientationchange", …) matches MDN’s legacy syntax.
Wrap in try/catch. Some environments may reject unexpected listeners.
Expect silence. Attaching does not guarantee the event will fire on modern browsers.
Migration rule. Replace this with Example 2 before shipping.
Compatibility
Browser Support
Screen orientationchange is Deprecated and Non-standard (MDN). Prefer screen.orientationchange, which is Baseline Widely available (since March 2023).
✓ Deprecated · Non-standard
Screen orientationchange
Legacy rotate event — do not rely on it. Use ScreenOrientation.change instead.
LegacyAvoid in new apps
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
orientationchangeDeprecated
Bottom line: Feature-detect only when migrating old code. New apps should use screen.orientation.addEventListener("change", …) and keep responsive CSS as a fallback.
Frequently Asked Questions
It is a deprecated, non-standard event that fired when the device orientation changed. Prefer the ScreenOrientation change event on screen.orientation instead.
MDN marks Screen: orientationchange as Deprecated and Non-standard. It is not Experimental. Do not use it in new code.
Listen for change on screen.orientation: screen.orientation.addEventListener("change", handler). That is the Screen Orientation API path MDN recommends.
Use addEventListener("orientationchange", handler) or the onorientationchange property on Screen (and historically also on window).
A generic Event. Re-read orientation details after it fires, or use the modern API’s type and angle.
Related legacy ideas. Window: orientationchange is also deprecated. Screen: orientationchange is additionally Non-standard. Prefer ScreenOrientation.change for both migration paths.