ScreenOrientation
EventTarget → js.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
type: OrientationTypeReturns the document's current orientation type, one of "portrait-primary", "portrait-secondary", "landscape-primary", or "landscape-secondary".
angle: IntReturns the document's current orientation angle.
onchange: haxe.FunctionFired whenever is the EventHandler called when the screen changes orientation.
lock(orientation: OrientationLockType): js.lib.Promise<Void>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(): VoidUnlocks the orientation of the containing document from its default orientation.