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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -