Device Orientation Events
The deviceorientationabsolute event is fired when absolute device orientation changes.
This event is not cancelable and does not bubble.
Syntax
Use the event name in EventTarget/addEventListener:
addEventListener("deviceorientationabsolute", (event) => { })
Alternatively, assign to the event handler property of the interface:
ondeviceorientationabsolute = (event) => { }
Event type
A DeviceOrientationEvent. Inherits from Event.
DeviceOrientationEvent
Specifications
Browser compatibility
See also
- window.devicemotion_event event
- window.deviceorientation_event event
- Detecting device orientation
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
