Device orientation events
Newly available since 2023-09-18 (baseline low)
The DeviceMotion
and DeviceOrientation
events report the movement and orientation of the browser's device in physical space.
Compatibility (view on caniuse.com)
- Chrome 31 Released on 2013-11-12
- Chrome Android 31 Released on 2013-11-14
- Edge 12 Released on 2015-07-29
- Firefox 6 Released on 2011-08-16
- Firefox for Android 6 Released on 2011-08-16
- Safari 17 Released on 2023-09-18
- Safari on iOS 4.2 Released on 2010-11-22
MDN docs
- DeviceOrientationEvent
- DeviceOrientationEvent.alpha
- DeviceOrientationEvent.beta
- DeviceOrientationEvent.gamma
- Window.deviceorientation_event
- DeviceMotionEvent
- DeviceMotionEvent.acceleration
- DeviceMotionEvent.accelerationIncludingGravity
- DeviceMotionEvent.interval
- DeviceMotionEvent.rotationRate
- Window.devicemotion_event
Specifications
BCD data
- api.DeviceOrientationEvent
- api.DeviceOrientationEvent.alpha
- api.DeviceOrientationEvent.beta
- api.DeviceOrientationEvent.gamma
- api.Window.deviceorientation_event
- api.DeviceMotionEvent
- api.DeviceMotionEvent.acceleration
- api.DeviceMotionEvent.accelerationIncludingGravity
- api.DeviceMotionEvent.interval
- api.DeviceMotionEvent.rotationRate
- api.Window.devicemotion_event