I am making toolbar for Mozilla Firefox. On the click of a button on my toolbar, I am opening a new window which navigates to my HTML Page created by me. On this HTML Page on the click of a button I am doing some work and closing the window.
That's all done, now I need my original or parent window's toolbar to get notified when this window is closed. I guess adding event listeners won't work as its all done in new window. Please suggest.
Any help is appreciated
Get a Warning When You Close Multiple Tabs in FirefoxOn the “Settings” window, in the left sidebar, click “General.” On the “General” screen, in the “Tabs” section, enable the “Confirm Before Closing Multiple Tabs” option.
Go to the browser menu and select "Settings." On the left, click on "Privacy & Security." Scroll down to the "Permissions" window, and select "Notification." If you want to disable notifications, check "Pause notifications until Firefox restarts." Thus, notifications will not appear until you restart Firefox.
Extension Metadata The default Firefox notification system doesn't notify you with audio, only visually. This extensions adds sounds to some notifications. Choose if which websites and supported extensions you want a sound to be played for. You can both work on an include or exclude principle.
You can use "window.onbeforeunload" event.
Here is the reference page: https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With