W3cubDocs

/Haxe JavaScript

DeviceOrientationEvent

package js.html

extends Event

@:native("DeviceOrientationEvent") Available on js

The DeviceOrientationEvent provides web developers with information from the physical orientation of the device running the web page.

Documentation DeviceOrientationEvent by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Constructor

new (type:String, ?eventInitDict:DeviceOrientationEventInit)

Throws:

null DOMError

Variables

read only absolute:Bool

A boolean that indicates whether or not the device is providing orientation data absolutely.

read only alpha:Float

A number representing the motion of the device around the z axis, express in degrees with values ranging from 0 to 360

read only beta:Float

A number representing the motion of the device around the x axis, express in degrees with values ranging from -180 to 180. This represents a front to back motion of the device.

read only gamma:Float

A number representing the motion of the device around the y axis, express in degrees with values ranging from -90 to 90. This represents a left to right motion of the device.

Methods

initDeviceOrientationEvent (type:String, canBubble:Bool, cancelable:Bool, alpha:Float, beta:Float, gamma:Float, absolute:Bool):Void

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/DeviceOrientationEvent.html