Events API Reference
.sendPromise(method[, params])
Sends a message to native client and returns the Promise
object with response data
Parameters
method
required The Boxo JS SDK method
params
optional Message data object
Example
You can also use imperative way
.send(method[, params])
Sends a message to native client
Parameters
method
required The Boxo JS SDK methodparams
optional Message data object
Example
.subscribe(fn)
Subscribes a function to events listening
Parameters
fn
required Function to be subscribed to events
Example
.unsubscribe(fn)
Unsubscribes a function from events listening
Parameters
- ```fn“ required Event subscribed function
Example
.supports(method)
Checks if an event is available on the current device
Parameters
method
required The Boxo JS SDK method
.isWebView()
Returns true
if Boxo JS SDK is running in mobile app, or false
if not