-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"If any event listeners were triggered" #1900
Comments
This aligns firing and dispatching of events with updated terminology in the DOM Standard. Among the changes: * A lot less usage of "default action" which isn't really a thing. Instead we make use of the return value of the fire and dispatch algorithms. * Instead of saying things bubble or are cancelable we initialize the attributes as such. * We no longer re-state defaults for isTrusted, bubbles, and cancelable, as that only leads to confusion when they are *not* re-stated. * We now use the legacy target override flag rather than supplying a named argument. This fixes #1713, but plenty of follow up issues remain: * #805 for the remainder of "default action" usage * #1394 for updating synthetic click events * #1887 for removing "fire a simple event" usage * #1893 for updating when checkboxes get checked * #1900 for figuring out if event dispatch requires more hooks * #1912 for revisiting isTrusted usage * #1913 for updating synthetic mouse events * #1922 for making more events composed
http://logs.glob.uno/?c=freenode%23whatwg&s=19%20Oct%202016&e=19%20Oct%202016#c1008554 has some advice as to how to test this. |
Didn't know where this was, here it is: FWIW, something like this also happens for some pairs of prefixed/unprefixed events, where the prefixed event is only fired if the prefixed one didn't invoke any event listeners. Very naughty. |
@foolip that's standardized already and currently doesn't involve dispatch leaking more to the outside world than a boolean. |
Oh, what spec does something like that already? Can't find anything in https://compat.spec.whatwg.org/ |
@foolip DOM. |
OK, in https://dom.spec.whatwg.org/#concept-event-listener-invoke animationend falls back to webkitAnimationEnd and so on. |
@smaug---- since you mentioned that other than Indexed DB we don't have special cases in event dispatch in Gecko, I guess the way these requirements are implemented is by a simple "has event listener named x" check? |
Hmm, I wonder what special case I meant with IDB. For that we have added the ability to detect whether a listener threw an exception. But as such that isn't IDB specific. Other event dispatchers just don't use that information. And doesn't seem to have anything to do with this bug. Existence of (before)unload listeners is simple http://searchfox.org/mozilla-central/rev/ae8c2e2354db652950fe0ec16983360c21857f2a/dom/events/EventListenerManager.cpp#1609-1620 |
@smaug---- that is what I meant for IDB. It would be related to this bug if how the HTML Standard describes how these event listeners are found would be correct, as that would also require changes to event dispatch, whereas checking for listeners is less intrusive (though still bad). |
This aligns firing and dispatching of events with updated terminology in the DOM Standard. Among the changes: * A lot less usage of "default action" which isn't really a thing. Instead we make use of the return value of the fire and dispatch algorithms. * Instead of saying things bubble or are cancelable we initialize the attributes as such. * We no longer re-state defaults for isTrusted, bubbles, and cancelable, as that only leads to confusion when they are *not* re-stated. * We now use the legacy target override flag rather than supplying a named argument. This fixes whatwg#1713, but plenty of follow up issues remain: * whatwg#805 for the remainder of "default action" usage * whatwg#1394 for updating synthetic click events * whatwg#1887 for removing "fire a simple event" usage * whatwg#1893 for updating when checkboxes get checked * whatwg#1900 for figuring out if event dispatch requires more hooks * whatwg#1912 for revisiting isTrusted usage * whatwg#1913 for updating synthetic mouse events * whatwg#1922 for making more events composed
#5889 removed this from HTML! |
I hope this sentence (occurs twice) is simply a mistake and can be replaced by something else. If not, it's another primitive that's not exposed by DOM's event dispatch algorithm and maybe should be.
The text was updated successfully, but these errors were encountered: