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 对象类型的参数描述发生的动作。
规范
| Specification |
|---|
| DeviceOrientation Event Specification # devicemotion |
| DeviceOrientation Event Specification # ref-for-dom-window-ondevicemotion |
浏览器兼容性
BCD tables only load in the browser