openWindow method
@AvailableInWorkers("service")
The openWindow() method of the Clients
interface creates a new top level browsing context and loads a given URL.
If the calling
script doesn't have permission to show popups, openWindow() will throw
an
InvalidAccessError.
In Firefox, the method is allowed to show popups only when called as the result of a notification click event.
In Chrome for Android, the method may instead open the URL in an existing browsing context provided by a standalone web app previously added to the user's home screen. As of recently, this also works on Chrome for Windows.
Implementation
external JSPromise<WindowClient?> openWindow(String url);