Chromium-extensions popup onunload or onbeforeunload
bigCat Posted in beatWife - 0 CommentAntony Sargent
View profile
More options Apr 7, 5:55 am
Actually for your case, there are two approaches you might take:
1) Use the messaging APIs to set up a Port between the popup and background
page. You then should get a onDisconnect event in the background page when
the popup goes away.
2) Have the background dispatch events using chrome.extension.getViews() -
if there is a popup in the list, you use the DOMWindow handle to call a
function in the popup directly.