Host
@smokeballdev/smokeball-client-sdk
Interface: Api
Entry point for the host in Smokeball.
Methods
close()
close(
request?
):void
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.
Parameters
request?
Returns
void
Example
modal()
modal(
request
):Promise
<boolean
>
Opens the provided url into a new browser window and returns only when the newly opened window is closed.
Parameters
request
Returns
Promise
<boolean
>
Example
open()
open(
request
):void
Opens the provided url into a new browser window.
Parameters
request
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(
tab
):void
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.
Parameters
tab
number
Returns
void
Example
type()
type():
HostType
Retrieves the host’s type.
Returns
version()
version():
Promise
<Version
>
Retrieves the host’s version.
Returns
Promise
<Version
>
the current version of the host.