Firefox Tomorrow

web api event

Screen: orientationchange event

View on MDN ↗

The orientationchange event fires when the device’s orientation has changed.

Syntax

Use the event name in methods like addEventListener(), or set an event handler property.

addEventListener("orientationchange", (event) => { })

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

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also