Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 522
ebi Avatar asked Apr 03 '13 21:04

ebi


People also ask

Can Chrome extension be detected?

Yes, it is possible to detect extensions, so long as you know your extension ID (which I'm sure you do).

Is Chrome getting rid of extensions?

Google is planning to remove inline installation from Chrome for existing extensions starting on September 12th, and Chrome users will be redirected to the Web Store. With Chrome 71 in early December, Google is also planning to remove the inline install API method entirely.

Why did my extensions disappear from Chrome?

Jump to each solution:Restart the browser. Check potentially corrupted extensions. Verify Google Chrome sync » worked for 1 visitor (Jul 2021) Reinstall extensions.

How do I force Chrome to disable an extension?

Open the Chrome browser and click on the three-dot menu icon in the upper right-corner. Click on More tools >Extensions. Simple click the toggle button of then extension you want to disable.


1 Answers

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.

like image 71
方 觉 Avatar answered Oct 21 '22 03:10

方 觉