Firefox OnBeforeUnload Fun!

So Kevin correctly pointed out that you can do the same onbeforeunload behavior in Firefox as you can in Internet Explorer. It does require a little bit of a tweak to use the DOM event model, though:

window.onbeforeunload = function (oEvent) {
    oEvent.returnValue = "blah";
}

See, even JavaScript authors can learn something new every once in a while!

New in the Store

My Code Sparks Joy (Sarcasm) T-shirt

Join the Mailing List

Never miss an update by joining 3,000 other mailing list members.