Is there an event for when a Chrome Extension popup is closed?

google-chrome-extension, javascript

Solution

You can try this. Connect to your background page with chrome.runtime.connect (or `chrome.extension.connect` before Chrome 26) and `port.onDisconnect` will be fired in your background page when the popup is closed.

Problem

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.

Original source

Related problems