Interface: Api
Entry point for the host in Smokeball.Methods
close()
close(Closes the host in the native app. When being called in the native app, this action closes the modal browser window. Nothing happens if called within a browser tab.request?
):void
Parameters
request?
CloseRequest
Returns
void
Example
modal()
modal(Opens the provided url into a new browser window and returns only when the newly opened window is closed.request
):Promise
<boolean
>
Parameters
request
OpenRequest
Returns
Promise
<boolean
>
Example
open()
open(Opens the provided url into a new browser window.request
):void
Parameters
request
OpenRequest
Returns
void
Example
refresh()
refresh(): void
Refresh the host in the native app.
When being called in the native app, this action will refresh the modal browser window.
Returns
void
Example
selectTab()
selectTab(Selects the tab in the host view. When being called in the native app, this action selects the specified tab. Nothing happens if the selected tab is invalid. Currently only supports the matter view. The main view is NOT supported.tab
):void
Parameters
tab
number
Returns
void
Example
type()
type(): HostType
Retrieves the host’s type.
Returns
HostType
version()
version():Retrieves the host’s version.Promise
<Version
>
Returns
Promise
<Version
>
the current version of the host.