Window.ondevicemotion

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
DeviceOrientation Event Specification (DeviceOrientation Event)
# ref-for-dom-window-ondevicemotion

Browser compatibility

BCD tables only load in the browser

See also