Methods
Introduction
This function closes the widget or sends data to the widget from the App.
Name
Description
sendMessage
Function to send data to the widget from the App
destroy
Function to close the widget
๐ API Explanation and Example
Methods at a Glance
// Sends a message to the created widget
widget.sendMessage(object: any)
// Closes widget
widget.destroy()sendMessage
This sends data to the widget from the App.
Parameter
Name
Type
Description
object
any
Data being sent to the widget from the App E.g. { name : โtestโ, message : โmessageโ }
Example
Send text and image data to the widget.


sample.html: Section where the text and image data is received and displayed
destroy
This function closes the widget.
Parameter
None
Example
Event Listeners
Last updated
Was this helpful?