ScreenOrientation

EventTargetjs.html.ScreenOrientation (extern class)

The ScreenOrientation interface of the the Screen Orientation API provides information about the current orientation of the document.

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

See:

Instance Members

Returns the document's current orientation type, one of "portrait-primary", "portrait-secondary", "landscape-primary", or "landscape-secondary".


angle: Int

Returns the document's current orientation angle.


onchange: haxe.Function

Fired whenever is the EventHandler called when the screen changes orientation.


Locks the orientation of the containing document to its default orientation and returns a Promise.

Name Type
orientation OrientationLockType
Returns
js.lib.Promise<Void>

unlock(): Void

Unlocks the orientation of the containing document from its default orientation.