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.

浏览器兼容

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes Yes6 ? ? ?
DeviceMotionEvent() constructor59 ? ? ? ? ?
acceleration Yes Yes6 ? ? ?
accelerationIncludingGravity Yes Yes6 ? ? ?
interval Yes Yes6 ? ? ?
rotationRate Yes Yes6 ? ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes Yes6 No4.2 ?
DeviceMotionEvent() constructor5959 ? ? ? ? ?
acceleration Yes Yes Yes6 No4.2 ?
accelerationIncludingGravity Yes Yes Yes6 No4.2 ?
interval Yes Yes Yes6 No4.2 ?
rotationRate Yes Yes Yes6 No4.2 ?

参考

文档标签和贡献者

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