Join us and the lead editor of IRL, Mozilla's multi-award-winning podcast, for a behind-the-scenes look at the pod and to contribute your ideas for the next season, themed: "AI and ME." Mark your calendar and join our Community Call on Wednesday, Aug 7, 17:00–17:45 UTC. See you there!

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

window.onunload is not working as expected.

more options

My Scenario .

On Close of the browser/ tab / refresh the tab we need to execute the piece of code.

All my code is in window.onbeforeunload which used to work in previous version of firefox .

But with the latest version code is executing only on closing the tab but not in the browser close or refresh . So i kept return statement in the window.onbeforeunload and all the code in the window.onunload . Now on click on the Leave this page it should call window.onunload and execute the code but in firefox it is not working like this. can you please provide me work around or solution for this.

Thanks alot.

My Scenario . On Close of the browser/ tab / refresh the tab we need to execute the piece of code. All my code is in window.onbeforeunload which used to work in previous version of firefox . But with the latest version code is executing only on closing the tab but not in the browser close or refresh . So i kept return statement in the window.onbeforeunload and all the code in the window.onunload . Now on click on the Leave this page it should call window.onunload and execute the code but in firefox it is not working like this. can you please provide me work around or solution for this. Thanks alot.

Keazen oplossing

Call Firefox using a batch file, and have your code in the batch after Firefox.

Dit antwurd yn kontekst lêze 👍 1

Alle antwurden (2)

more options

Keazen oplossing

Call Firefox using a batch file, and have your code in the batch after Firefox.

more options

please suggest if any other approaches we cannot use the suggested approach... or please let us know if this is bug in latest version so that will wait till it get resolved ... thanks