showing results for - "web app let user confirm closing tab"
Claudia
25 Aug 2019
1window.onbeforeunload = function (e) {
2    e = e || window.event;
3    // For IE and Firefox prior to version 4
4    if (e) {
5        e.returnValue = 'Sure?';
6    }
7    // For Safari
8    return 'Sure?';
9};