W3cubDocs

/Web APIs

ScreenOrientation.onchange

The onchange property of the ScreenOrientation is an event handler fired whenever is the event handler called when the screen changes orientation.

Syntax

screen.orientation.addEventListener('change', function(e) { ... })
screen.orientation.onchange = function(e) { ... }

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
onchange
38
79
43
No
25
No
38
38
43
25
No
3.0

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/onchange