Configure firefox popup using javascript

When the user tries to close the browser window, a pop-up window appears. But the problem is that it displays its own popup data. So please let me know how I can customize its pop-up content in "Firefox".

window.onbeforeunload = function() { return "my text"; }; 

Here, instead of "my text", your own data is displayed. Note: its work works fine in Chrome!

Thanks.

+4
source share
1 answer

You can't ... not in FF

Please note that in Firefox 4 and later, it is not displayed to the user. See error 588292 . *

The only solution is to create a custom modal box and assign a CSS style to this DIV (for example ...)

Source: developer.mozilla.org

+4
source

Source: https://habr.com/ru/post/1500689/


All Articles