Event Listeners
Last updated
Last updated
Provided below are functions that activate when data is sent to the App from the widget.
onMessage
Function that activates when messages sent from widget are received on the App
widget.onMessage.Add(function(player, data: any){});
Callback function that activates when a message is sent from the widget to the App.
Parameters
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