Web/API/Window/ondevicemotion

From Get docs


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

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
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