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 EventHandler called when the screen changes orientation.

Syntax

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

Specifications

Specification Status Comment
Screen Orientation API
The definition of 'onchange' in that specification.
Working Draft Initial definition.

Browser compatibility

BCD tables only load in the browser