files/en-us/web/api/devicemotionevent/index.md
{{APIRef("Device Orientation Events")}}{{securecontext_header}}
The DeviceMotionEvent interface of the {{domxref("Device Orientation Events", "", "", "nocode")}} provides web developers with information about the speed of changes for the device's position and orientation.
[!WARNING] Currently, Firefox and Chrome do not handle the coordinates the same way. Take care about this while using them.
{{InheritanceDiagram}}
DeviceMotionEvent."granted" or "denied".window.addEventListener("devicemotion", (event) => {
console.log(`${event.acceleration.x} m/s2`);
});
{{Specifications}}
{{Compat}}