Tutorial: System.openUrlWithBrowser

System.openUrlWithBrowser

Opens the passed URL in the default web browser. It only supports http(s) and fin(s) protocols by default. In order to use other custom protocols, they have to be enabled via API security settings. File protocol and file path are not supported.

Example

fin.System.openUrlWithBrowser('https://cdn.openfin.co/docs/javascript/stable/tutorial-System.openUrlWithBrowser.html')
.then(() => console.log('Opened URL'))
.catch(err => console.log(err));

Example of permission definition to enable non-default protocols

Note: permission definition should be specified in an app manifest file if there is no DOS settings. Otherwise it has to be specified in both DOS and app manifest files.

    "permissions": {
       "System": {
           "openUrlWithBrowser": {
                "enabled": true,
                "protocols": [ "msteams", "slack"]
            }
       }
    }