MDN self-hosted library · e01.org

Screen: orientationchange event

Screen Orientation API

no runnable cells web-api-event upstream source

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.

Browser compatibility

See also