Conversation
|
I think this is cool; LGTM. I totally didn't know that doing |
source
Outdated
| <dl class="domintro"> | ||
|
|
||
| <dt><var>event</var> . <code subdfn data-x="dom-BeforeUnloadEvent-returnValue">returnValue</code> [ = <var>value</var> ]</dt> | ||
| <dt><var>event</var> . <code subdfn data-x="dom-BeforeUnloadEvent-returnValue">returnValue</code> [ = " " ]</dt> |
There was a problem hiding this comment.
This is a little weird. Are you trying to say that the only valid value is a space?
There was a problem hiding this comment.
I'm trying to say that setting it to a generic value is meaningless, so here's an example of what you could do.
Maybe we should w-nodev this whole section and remove the domintro box since devs should be using e.preventDefault() anyway.
There was a problem hiding this comment.
I like the latter solution more I think.
There was a problem hiding this comment.
Perhaps with // historical annotation in IDL.
4163263 to
1ffc09d
Compare
|
I switched things up a bit (sorry no fixup commit) to make it clearer that preventDefault() is the correct thing to do. I added some authoring guidance and wording about how the entire interface is legacy, instead of marking the whole thing w-nodev, since it seems weird to exclude an entire interface from the dev version. One thing we could do is move the interface into https://html.spec.whatwg.org/#obsolete, but I wasn't sure, since it seems somewhat important to keep it near the rest of the unloading algorithms. |
|
Still LGTM. |
|
LGTM too. Leaving to @domenic to merge in case he changes his mind about moving the interface overnight. |
1ffc09d to
01d9870
Compare
Instead of using it as the message to show to the user, simply compare it against the empty string or not. This matches Gecko, WebKit, and Blink (but not yet EdgeHTML). Closes #952.
Instead of using it as the message to show to the user, simply compare
it against the empty string or not. This matches Gecko, WebKit, and
Blink (but not yet EdgeHTML).
Closes #952.
@avidrissman, can you review?
Ideally we'd probably get rid of
returnValueentirely (and the weird return behavior) and just useevent.preventDefault(), but I assume that's not web-compatible and nobody wants to try. So instead I just added lots of notes about how the DOMStringiness of returnValue is a historical artifact.