How to determine which popup is closed the extension in Chrome?
window.onclose does not help.
When you press the button, a window is created. And then, when it is closed, the link remains! References to functions to and called without problems from the background page! Events inside the popup (including setInterval) remain and work!
(FireFox in this respect easier - there is a popup immediately die, and all the links become "dead" and cause an error if using).
How to understand that popup is hidden? The problem is only in Chrome.