DeviceOrientationEvent.absolute

表示该设备是否提供绝对定位数据 (这个数据是关于地球的坐标系) 或者使用了由设备决定的专门的坐标系. 查看更多关于 Orientation and motion data explained 的细节.

语法

var absolute = instanceOfDeviceOrientationEvent.absolute;

如果方向数据跟地球坐标系和设备坐标系有差异,则absolutetrue,如果方向数据由设备本身的坐标系提供,则absolutefalse

说明

Specification Status Comment
DeviceOrientation Event Specification Editor's Draft Initial specification.

浏览器兼容性

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help! (en-US)

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 7.0 (Yes) 6 [1] ? ? ?
Feature Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 3.0 (Yes) 6 [1] 未实现 未实现 4.2

[1] Firefox 3.6, 4, and 5 supported mozOrientation instead of the standard DeviceOrientationEvent interface

参见