Skip to content

Basic usage

githubcatw edited this page Apr 11, 2023 · 3 revisions

Opening a browser window

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.

Advanced settings

On some platforms there are extra platform-specific settings for browser windows - see the page on platform-specific customization.

Closing a browser window

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.

Clone this wiki locally