此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

DeviceOrientationEvent.absolute

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

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

语法

var absolute = instanceOfDeviceOrientationEvent.absolute;

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

说明

Specification
Device Orientation and Motion
# dom-deviceorientationevent-absolute

浏览器兼容性

参见