Listen when extension popup page closes in Crossrider -
i need know when crossrider's extension closes can throw message in background. easy on other way around
appapi.ready(function() { }
this i'm using on popup.html
determine if extension opened. need appapi.close(function() {})
can't find on crossrider's doc http://docs.crossrider.com/
thanks, kevin
so if want monitor "popup page close" event, listen unload
event popup page.
window.addeventlistener("unload", function() { // logic here }, false);
please aware can't use console.log
in function, since time unload event fires late. see this post more details.
Comments
Post a Comment