---
title: ondevicemotion
framework: webkitjs
role: symbol
role_heading: Instance Property
path: webkitjs/domwindow/1632048-ondevicemotion
---

# ondevicemotion

The event listener that is called when the device motion changes.

## Declaration

```data
attribute EventHandler ondevicemotion;
```

## Discussion

Discussion Read DeviceMotionEvent for details.

## See Also

### Getting Orientation and Motion Events

- [orientation](webkitjs/domwindow/1632568-orientation.md)
- [ondeviceorientation](webkitjs/domwindow/1628872-ondeviceorientation.md)
