Add API to send visibiliy actions to widgets
This commit is contained in:
parent
746eeee33c
commit
4b6378a80d
2 changed files with 14 additions and 0 deletions
|
@ -94,6 +94,16 @@ export default class WidgetMessaging {
|
|||
});
|
||||
}
|
||||
|
||||
sendVisibility(visible) {
|
||||
return this.messageToWidget({
|
||||
api: OUTBOUND_API_NAME,
|
||||
action: "visibility",
|
||||
visible,
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("Failed to send visibility: ", error);
|
||||
});
|
||||
}
|
||||
|
||||
start() {
|
||||
this.fromWidget.addEndpoint(this.widgetId, this.widgetUrl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue