window.onbeforeunload in Chrome: what is the most recent fix?
问题 Obviously, window.onbeforeunload has encountered its fair share of problems with Chrome as I've seen from all the problems I've encountered. What's the most recent work around? The only thing I've got even close to working is this: window.onbeforeunload = function () { return "alert" }; However, if I substitute return "alert" with something like alert("blah"), I get nothing from Chrome. I saw in this question that Google purposefully blocks this. Good for them... but what if I want to make an