DeviceMotionEvent.acceleration

  • Revision slug: DOM/DeviceMotionEvent.acceleration
  • Revision title: DeviceMotionEvent.acceleration
  • Revision id: 68405
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment one or more formatting changes

Revision Content

{{ DomRef() }}

Summary

Returns the amount of acceleration recorded by the device, in meters per second squared.

Syntax

var acceleration = motionEvent.acceleration;

Example

Specification

See also

Revision Source

<p>{{ DomRef() }}</p>
<h3 name="Summary">Summary</h3>
<p>Returns the amount of acceleration recorded by the device, in meters per second squared.</p>
<h3 name="Syntax">Syntax</h3>
<pre class="eval"><em>var acceleration</em> = motionEvent.acceleration;
</pre>
<h3 name="Example">Example</h3>
<h3 name="Specification">Specification</h3>
<ul> <li><a class="external" href="http://www.w3.org/TR/orientation-event/" title="http://www.w3.org/TR/orientation-event/">DeviceOrientation Event Specification</a></li>
</ul>
<h3>See also</h3>
<ul> <li>{{ domxref("DeviceMotionEvent") }}</li> <li><a href="/en/Detecting_device_orientation" title="Detecting device orientation">Detecting device orientation</a></li> <li>{{ domxref("window.ondevicemotion") }}</li>
</ul>
Revert to this revision