Called when popup is closed.
onClose = function(event)
You can add event listener during the object creation: w2popup.open({ title : 'Title', body : 'Body', onClose : function (event) { console.log('event: ' + event.type, event); } }); or after popup is opened: w2popup.on('close', function(event) { console.log('event: ' + event.type, event); }); The event handler is called before the default action of the event is triggered. You can cancel the default action by calling event.preventDefault(). To perform an action after the event is fully processed, define event.onComplete function.
See events page in utilities for more details.