API Reference - WebPortal.nativePopup.evt.cancel
WebPortal.nativePopup.evt.cancel
Event triggered when the Cancel button of the popup is clicked.
NativePopups interacts with the Notification Center but they are deprecated, you should use WebPortal.notification.new instead.
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(type){
	    //When the *cancel* button of the  popup is clicked.
	    case "WebPortal.popup.evt.cancel":
		console.log("The *cancel* button of the  popup is clicked");
		alert("The *cancel* button of the  popup is clicked");
		break;
	    }
	}
    });