ScreenOrientation.onchange

Experimental

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

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

Specification
The Screen Orientation API
# dom-screenorientation-onchange

Browser compatibility

BCD tables only load in the browser