Monday, May 20, 2024
121
rated 0 times [  122] [ 1]  / answers: 1 / hits: 20977  / 11 Years ago, wed, april 3, 2013, 12:00:00

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.


More From » google-chrome-extension

 Answers
14

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.


[#79136] Tuesday, April 2, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
campbelljonahb

Total Points: 247
Total Questions: 97
Total Answers: 110

Location: Jordan
Member since Wed, Jun 17, 2020
4 Years ago
;