Window.ondevicemotion

这篇翻译不完整。请帮忙从英语翻译这篇文章

摘要

一个发送到窗口的devicemotion事件处理程序。

语法

window.ondevicemotion = funcRef;

Where funcRef is a reference to a function. This function receives a DeviceMotionEvent object describing the motion that occurred.

这里的funcRef是一个函数的引用。这个函数接收一个DeviceMotionEvent 对象类型的参数描述发生的动作。

规范

规范 状态 备注
Device Orientation Events Working 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!

  
Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes) (Yes) 6 (6) ? ? ?
Constructor 59 ? ? ? ? ?
  
Feature Android Webview Chrome for Android Edge Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support (Yes) (Yes) (Yes) 6.0 (6) No support No support 4.2
Constructor 59 59 ? ? ? ? ?

参考

文档标签和贡献者

 此页面的贡献者: pinpinye, Mmzer
 最后编辑者: pinpinye,