Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Learn More

window unload event issue

more options

I have made some async function call in window unload event, which works perfect for all browser but in Firefox it creates issue whenever the closing tab is last tab. It does not call the windows unload event. Technically each tab must work same. like works in chrome. Whenever we have multiple tabs it works well but however the last tab closes it does not work.

I have made some async function call in window unload event, which works perfect for all browser but in Firefox it creates issue whenever the closing tab is last tab. It does not call the windows unload event. Technically each tab must work same. like works in chrome. Whenever we have multiple tabs it works well but however the last tab closes it does not work.

Upravil(a) Preetam Jakhmola dňa

Všetky odpovede (1)

more options

I think I remember this from another thread somewhere.

Can you use navigator.sendBeacon()? See:

I actually haven't tested whether that works on the last tab or not.


There is a bug on file related to the last tab. If I understand it correctly:

https://bugzilla.mozilla.org/show_bug.cgi?id=1532555

Before commenting, see: Bugzilla Etiquette