Interface ScreenOrientation.ScreenOrientationJs

All Superinterfaces:
Serializable
Enclosing class:
ScreenOrientation

@JsDefinition public static interface ScreenOrientation.ScreenOrientationJs extends Serializable
What locking the screen orientation asks of its client-side bridge, as a JavaScript definition for Element.executeJs(Class).
Since:
25.4
  • 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

      @JsExpression("window.Vaadin.Flow.screenOrientation.unlock()") PendingJavaScriptResult unlock()
      Lets the screen follow the device again.
      Returns:
      the pending result, which completes once the browser has released the lock