Interface ScreenOrientation.ScreenOrientationJs
- All Superinterfaces:
Serializable
- Enclosing class:
ScreenOrientation
What locking the screen orientation asks of its client-side bridge, as a
JavaScript definition for
Element.executeJs(Class).- Since:
- 25.4
-
Method Summary
Modifier and TypeMethodDescriptionLocks the screen to the given orientation.unlock()Lets the screen follow the device again.
-
Method Details
-
lock
@JsExpression("return window.Vaadin.Flow.screenOrientation.lock($0)") PendingJavaScriptResult lock(String orientation) Locks the screen to the given orientation.- Parameters:
orientation- the orientation as the browser names it- Returns:
- the pending result, which answers with what the browser made of the request
-
unlock
Lets the screen follow the device again.- Returns:
- the pending result, which completes once the browser has released the lock
-