Re: [whatwg/dom] Standardize certain Microsoft event extensions (#334)

> If you set returnValue to false (or the empty string for an event of type beforeunload), prevent the default action.

I did some digging on `returnValue = ""`, which is [mentioned in HTML](https://html.spec.whatwg.org/multipage/browsers.html#prompt-to-unload-a-document)

> ...and the returnValue attribute of the event object is not the empty string...

Using this test: https://miketaylr.com/bzla/beforeunload-2.html, Firefox and Presto are the only engines that don't prompt the user if you manually set `returnValue` to the empty string. @patrickkettner [tested IE6 - 8](https://twitter.com/patrickkettner/status/834074987694743553) and they behave like Gecko and Presto.

OTOH, Chrome, Safari, (new) Opera, Edge and IE9+ do show the prompt. 

Since IE9+ and Edge didn't require this for webcompat, *and* WebKit/Blink never had it, that's a pretty good signal we could remove that special handling from HTML and not bother with it here.

(I wonder if IE maintained that behavior for attachEvent, or something. But that doesn't matter).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/334#issuecomment-281395131

Received on Tuesday, 21 February 2017 16:25:40 UTC