I\'ve already tried window.unload, window.beforeunload, etc. I\'m looking for a way to notify my background page once the popup is closed.
Finally found the solution. Put below code in background.js/eventPage.js:
background.js
eventPage.js
chrome.windows.onFocusChanged.addListener(function(window) { //handle close event });