-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Make event handlers share a code path with addEventListener() #3561
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
Conversation
See whatwg/dom#596 and whatwg/dom#365 and w3c/ServiceWorker#1004 for more context.
@domenic I aligned this with the approved DOM PR. Would be nice to land them both at the same time I think. |
<var>callback</var>.</p> | ||
|
||
<p class="note">To be clear, an <span>event listener</span> is different from an <code | ||
data-x="dom-EventListener">EventListener</code>.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will get some laughs from future readers :)
We should have tests for the normative change aspects of this I guess? Which are related to service workers? |
Yeah, I was wondering about that. See also whatwg/dom#371 (comment). I'm kind of inclined to land this now and leave testing for that issue, mostly because DOM is seeing many changes at the moment and dealing with merge conflicts is not my favorite. |
Yeah, testing this when you fix 371 makes sense. |
This hook ensures that any special casing in addEventListener() is shared with event handlers. This commit also makes numerous editorial improvements that were long overdue around dictionary members. The corresponding change to the HTML Standard, which defines event handlers, is tracked by whatwg/html#3561. This helps with #365 and w3c/ServiceWorker#1004. (Tests will be added as part of #365 eventually.)
See whatwg/dom#596 and whatwg/dom#365 and w3c/ServiceWorker#1004 for more context.
/acknowledgements.html ( diff )
/infrastructure.html ( diff )
/webappapis.html ( diff )