DeviceAcceleration.x

  • Revision slug: Web/API/DeviceAcceleration.x
  • Revision title: DeviceAcceleration.x
  • Revision id: 400105
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 1 words added, 1 words removedMoved From DOM/DeviceAcceleration.x to Web/API/DeviceAcceleration.x

Revision Content

{{ DomRef() }}

Summary

This property indicates the amount of acceleration that occurred along the X axis in a {{ domxref("DeviceAcceleration") }} object.

Syntax

var xAccel = deviceAcceleration.x;

This property is read-only.

Return value

x
A double indicating the amount of acceleration along the X axis. See Accelerometer values explained for details.

Specification

Revision Source

<p>{{ DomRef() }}</p>
<h3 id="Summary" name="Summary">Summary</h3>
<p>This property indicates the amount of acceleration that occurred along the X axis in a {{ domxref("DeviceAcceleration") }} object.</p>
<h3 id="Syntax" name="Syntax">Syntax</h3>
<pre class="eval">var <em>xAccel</em> = <em>deviceAcceleration</em>.x;
</pre>
<p>This property is read-only.</p>
<h3 id="Return_Value" name="Return_Value">Return value</h3>
<dl> <dt><code>x</code></dt> <dd>A <code>double</code> indicating the amount of acceleration along the X axis. See <a href="/en/Detecting_device_orientation#Accelerometer_values_explained" title="en/Detecting device orientation#Accelerometer values explained">Accelerometer values explained</a> for details.</dd>
</dl>
<h3 id="Specification" 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 specification</a></li>
</ul>
Revert to this revision