An event handler for the devicemotion
events sent to the window.
Syntax
window.ondevicemotion = funcRef;
Where funcRef
is a reference to a function. This function receives a DeviceMotionEvent
object describing the motion that occurred.
Specifications
Specification | Status | Comment |
---|---|---|
DeviceOrientation Event Specification | Editor's Draft | Initial definition. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ondevicemotion
|
Chrome
Full support 31 |
Edge
Full support 12 |
Firefox
Full support 9 |
IE
Full support 11 |
Opera
Full support 18 |
Safari
No support No |
WebView Android
Full support 4.4 |
Chrome Android
Full support 31 |
Firefox Android
Full support 9 |
Opera Android
Full support 18 |
Safari iOS
No support No |
Samsung Internet Android
Full support 2.0 |
Legend
- Full support
- Full support
- No support
- No support
See also
Window.ondevicemotion by Mozilla Contributors is licensed under CC-BY-SA 2.5.