function isCalendlyEvent(e) {
return e.data.event &&
e.data.event.indexOf('calendly') === 0;
};
window.addEventListener(
'message',
function(e) {
if (isCalendlyEvent(e)) {
console.log(e.data);
}
}
);
I am using the PopupWidget in a project. I am subscribing to the popup notifications as indicated in the documentation and updating the front-end accordingly.
The problem is that, when an event is cancelled through the popup, it doesn't emit any event, so I can't know at that moment that the user cancelled the event.
How can I solve this? Is there any way to detect it?