-
Notifications
You must be signed in to change notification settings - Fork 1
Basic usage
githubcatw edited this page Apr 11, 2023
·
3 revisions
The simplest way to open a browser window is with BrowserWindow.Open.
Here's an example:
using NT.BrowserWindow;
// ...
void OpenInfo() {
BrowserWindow.Open("https://github.com/githubcatw/BrowserWindow");
}Calling OpenInfo() will open this repository in a web browser.
On some platforms there are extra platform-specific settings for browser windows - see the page on platform-specific customization.
On some platforms apps have to manually tell the OS to close browser a window; they aren't closed automatically, e.g. when opening an app's deep link.
Since 1.2 (currently in beta in the dev branch) you can close a browser window with BrowserWindow.Close();
Note that this currently works on iOS only, as on Android deep links work fine.