secondaryBrowser module
Note
This namespace is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Module to power up the in-app browser experiences in the host app. For e.g., opening a URL in the host app inside a browser
Functions
is |
Checks if secondaryBrowser capability is supported by the host |
open(URL) | Open a URL in the secondary browser. On mobile, this is the in-app browser. On web and desktop, please use the |
Function Details
isSupported()
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Checks if secondaryBrowser capability is supported by the host
function isSupported(): boolean
Returns
boolean
boolean to represent whether secondaryBrowser is supported
open(URL)
Note
This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Open a URL in the secondary browser.
On mobile, this is the in-app browser.
On web and desktop, please use the window.open()
method or other native external browser methods.
function open(url: URL): Promise<void>
Parameters
- url
-
URL
Url to open in the browser
Returns
Promise<void>
Promise that successfully resolves if the URL opens in the secondaryBrowser or throws an error SdkError incase of failure before starting navigation
Remarks
Any error that happens after navigation begins is handled by the platform browser component and not returned from this function.