Skip to content

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

Merged
merged 5 commits into from
Mar 14, 2018

Conversation

annevk
Copy link
Member

@annevk annevk commented Mar 13, 2018

@annevk annevk added normative change integration Better coordination across standards needed labels Mar 13, 2018
@annevk
Copy link
Member Author

annevk commented Mar 14, 2018

@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>
Copy link
Member

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 :)

@domenic
Copy link
Member

domenic commented Mar 14, 2018

We should have tests for the normative change aspects of this I guess? Which are related to service workers?

@annevk
Copy link
Member Author

annevk commented Mar 14, 2018

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.

@domenic
Copy link
Member

domenic commented Mar 14, 2018

Yeah, testing this when you fix 371 makes sense.

annevk added a commit to whatwg/dom that referenced this pull request Mar 14, 2018
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.)
@annevk annevk merged commit 9a2a66c into master Mar 14, 2018
@annevk annevk deleted the annevk/add-an-event-listener branch March 14, 2018 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration Better coordination across standards needed normative change
Development

Successfully merging this pull request may close these issues.

2 participants