Window.onbeforeunload in FireFOX

3

When using "window.onbeforeunload" in firefox, it returns only a generic message as the image below:

IsthereanywayIcancustomizethismessageina"modal" in firefox?

    
asked by anonymous 24.04.2015 / 23:27

1 answer

1

Unfortunately, no it is possible to override the default message in Firefox.

The beforeunload event uses an internal browser method to stop closing / browsing. In the function assigned to the event, you must return a string that will be added to the default browser message. This in all browsers LESS Firefox, which only displays your own message.

Event documentation on the Mozilla Developer Network: link

Documentation on MSDN: link

    
24.04.2015 / 23:55