Summary

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
Device Orientation Events Working Draft Initial specification.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Compatibility unknown  
Compatibility unknown

See also

Document Tags and Contributors

Contributors to this page: wbamberg, fscholz, cpigat, jsx, teoli, libreGeekingKid, Jeremie, Sheppy
Last updated by: wbamberg,