Screen: orientationchange event
Screen Orientation API
Screen Orientation API
The orientationchange event fires when the device's orientation has changed.
Syntax
Use the event name in addEventListener():
addEventListener("orientationchange", (event) => { })
Alternatively, assign to the event handler property of the interface:
onorientationchange = (event) => { }
Event type
A generic Event.
Specifications
This feature is not part of any specification. It is no longer on track to becoming a standard.
Use the ScreenOrientation change event instead.