Event Listeners
Introduction
Provided below are functions that activate when data is sent to the App from the widget.
Name
Description
onMessage
Function that activates when messages sent from widget are received on the App
π API Explanation and Example
onMessage
Callback function that activates when a message is sent from the widget to the App.
Parameters
Name
Type
Description
player
Player
The player who owns the widget
data
Object
The message sent from the widget to the App
Example
Create a function to close the widget screen when x is pressed.

sample.html: Button and script section
Last updated
Was this helpful?