Window.ondeviceorientation

Summary

An event handler for the deviceorientation event, which contains information about a relative device orientation change.

Syntax

window.ondeviceorientation = function(event) { ... };
window.addEventListener('deviceorientation', function(event) { ... });

Specifications

Specification
DeviceOrientation Event Specification (DeviceOrientation Event)
# ref-for-dom-window-ondeviceorientation

Browser compatibility

BCD tables only load in the browser

See also