MozOrientation

  • Revision slug: DOM/MozOrientation
  • Revision title: MozOrientation
  • Revision id: 57229
  • Created:
  • Creator: fryn
  • Is current revision? No
  • Comment 3 words added

Revision Content

{{ DomRef() }}

{{ gecko_minversion_header("1.9.2") }}

Summary

An event that repeatedly fired on the window as accelerator data is provided to the browser.

Example

window.addEventListener("MozOrientation", doFunc, true);

The example below simply displays the raw accelerometer data in the browser window as the events arrive.

{{ embed_text("orientation.html", "html") }}

Notes

This event is only dispatched if an accelerometer is available on the current device.

Specification

Not part of any specification.

See also

  • Detecting device orientation
  • {{ interface("nsIDOMOrientationEvent") }}
  • {{ interface("nsIAcceleration") }}
  • {{ interface("nsIAccelerationListener") }}
  • {{ interface("nsIAccelerometer") }}

{{ languages( { "ja": "ja/DOM/MozOrientation"} ) }}

Revision Source

<p>{{ DomRef() }}</p>
<p>{{ gecko_minversion_header("1.9.2") }}</p>
<h3 name="Summary">Summary</h3>
<p>An event that repeatedly fired on the window as accelerator data is provided to the browser.</p>
<h3 name="Example">Example</h3>
<pre>window.addEventListener("MozOrientation", doFunc, true);
</pre>
<p>The example below simply displays the raw accelerometer data in the browser window as the events arrive.</p>
<p>{{ embed_text("orientation.html", "html") }}</p>
<h3 name="Notes">Notes</h3>
<p>This event is only dispatched if an accelerometer is available on the current device.</p>
<h3 name="Specification">Specification</h3>
<p>Not part of any specification.</p>
<h3>See also</h3>
<ul> <li><a href="/en/Detecting_device_orientation" title="en/Detecting device orientation">Detecting device orientation</a></li> <li>{{ interface("nsIDOMOrientationEvent") }}</li> <li>{{ interface("nsIAcceleration") }}</li> <li>{{ interface("nsIAccelerationListener") }}</li> <li>{{ interface("nsIAccelerometer") }}</li>
</ul>
<p>{{ languages( { "ja": "ja/DOM/MozOrientation"} ) }}</p>
Revert to this revision