This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

An event handler for the orientationchange events sent to the screen object.

Syntax

screen.onorientationchange = funcRef;

Where funcRef is a reference to a function.

Specifications

Specification Status Comment
Screen Orientation API Working Draft Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android Full support Yes
Alternate Name
Full support Yes
Alternate Name
Alternate Name Uses the non-standard name: onmozorientationchange
Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Uses a non-standard name.
Uses a non-standard name.

See also

Document Tags and Contributors

Contributors to this page: fscholz, Sebastianz, teoli, Sheppy, kscarfone, namolmes, Jeremie, justinpotts
Last updated by: fscholz,