window.onbeforeload and <body onbeforeload=""> don't work.
<rdar://problem/8123561>
Brady later determined this was an invalid bug.