API Reference - WebPortal.MQTT.evt.messageDelivered
WebPortal.MQTT.evt.messageDelivered
Event triggered when the MQTT message has been sucessfully delivered.
Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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(type){
//When the MQTT message has been sucessfully delivered
case "WebPortal.MQTT.evt.messageDelivered":
console.log("The MQTT message has been sucessfully delivered");
alert("The MQTT message has been sucessfully delivered");
break;
}
}
});