API Reference - WebPortal.closeTimeoutPopupRequest
WebPortal.closeTimeoutPopupRequest
Event triggered when the popup MQTT popup timeout occurs (15 seconds by default).
Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
window.addEventListener("message", function(event){
if (typeof event.data !== 'undefined' && typeof event.data.type !== 'undefined' ){
var data = event.data;
var type = event.data.type;
switch(data.value.popupAction){
//When the application is put in foreground
case "WebPortal.closeTimeoutPopupRequest":
console.log("Popup timeout reached");
alert("Popup timeout reached");
break;
}
}
});