API Reference - WebPortal.cancelBtnPopupRequestClicked
WebPortal.cancelBtnPopupRequestClicked
Event triggered when the Cancel popup MQTT popup button is clicked.
Be carefull: To retrieve this event you have to use WebPortal.getPendingNotifications() method.
1
2
3
4
5
6
7
8
9
10
11
12
//Retrieve pending notification
var getPendingNotifications = function(){
var notificationsList = WebPortal.getPendingNotifications('app_id');
notificationsList.map(processNotification);
};
//Process retrieved notification
var processNotification = function(notification) {
if (notification.popupAction === 'WebPortal.cancelBtnPopupRequestClicked') {
alert("Popup cancel button clicked!");
}
};