Package com.vaadin.flow.component.page
Interface Page.NavigationJs
- All Superinterfaces:
Serializable
- Enclosing class:
Page
What this page runs to open a URL, as a JavaScript definition for
Page.executeJs(Class). Kept apart from Page.PageJs since it
reaches the execution context of the client and does not check the URL,
which open(String, String) does before calling it.
For internal use only. May be renamed or removed in a future release.
- Since:
- 25.4
-
Method Summary
-
Method Details
-
open
@JsExpression("window.dispatchEvent(new CustomEvent(\'vaadin-redirect-pending\', {detail: {url: $0}}));\nif ($1 == \'_self\') $executionContext.stopApplication();\nwindow.open($0, $1);\n") @JsWithExecutionContext void open(String url, String windowName) Opens a URL in the window with the given name, after telling the client that a redirect is pending. Opening it in this window stops the application first, so that the client does not try to talk to the server while the page unloads.- Parameters:
url- the URL to openwindowName- the name of the window to open it in, or_selffor this window
-