---
title: DeviceMotionEvent
framework: webkitjs
role: symbol
role_heading: Class
path: webkitjs/devicemotionevent
---

# DeviceMotionEvent

An instance of DeviceMotionEvent is created when significant change in motion occurs. The event object encapsulates the measurements of the interval, rotation rate, and acceleration of a device.

## Declaration

```data
interface DeviceMotionEvent
```

## Overview

Overview The accelerometer measures the sum of two acceleration vectors: gravity and user acceleration. User acceleration is the acceleration that the user imparts to the device. Because the system is able to track the device’s attitude using both the gyroscope and the accelerometer, it can differentiate between gravity and user acceleration. You register for these types of events using the window’s addEventListener method by passing devicemotion as the event type.

## Topics

### Creating Motion Events

- [initDeviceMotionEvent](webkitjs/devicemotionevent/1633270-initdevicemotionevent.md)

### Getting Motion Event Properties

- [acceleration](webkitjs/devicemotionevent/1629483-acceleration.md)
- [accelerationIncludingGravity](webkitjs/devicemotionevent/1629110-accelerationincludinggravity.md)
- [interval](webkitjs/devicemotionevent/1632148-interval.md)
- [rotationRate](webkitjs/devicemotionevent/1634377-rotationrate.md)

## Relationships

### Inherits From

- [Event](tvmljs/event.md)
