Skip to content
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

DOM Events introduction: clarify how listeners are invoked #890

Merged
merged 1 commit into from
Sep 10, 2020

Conversation

annevk
Copy link
Member

@annevk annevk commented Sep 9, 2020

Fixes #888.


Preview | Diff

<pre class='lang-markup'>
<p>When an <a>event</a> is <a>dispatched</a> to an object that <a>participates</a> in a <a>tree</a>
(e.g., an <a for=/>element</a>), it can reach <a>event listeners</a> on that object's
<a>ancestors</a> too. Effectively, all the object's <a>inclusive ancestor</a> <a>event listeners</a>
Copy link

@kevinsung kevinsung Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of the word "Effectively" leaves ambiguity as to what the true behavior is. If there is actually no ambiguity, then I would not use that word; I would replace it with "Firstly" or "In particular" or something like that. If there is in fact ambiguity (I do not know) then it's fine to leave it, though a note of clarification may be helpful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an approximation as shadow trees and the Window object make it more involved than this. Not sure how to capture that succinctly though.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that's fine then.

Copy link

@kevinsung kevinsung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can vouch for the clarity of the wording and its consistency with the example, but not its correctness (I'm not qualified for that).

Copy link
Member

@sideshowbarker sideshowbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comment (relevant to @kevinsung’s specific comment about “effectively”): To avoid ambiguity about what statements in the DOM spec are normative and which aren’t, it seems like it would be useful for non-normative sections of the published DOM spec to be rendered with explicit This section is non-normative text after the section headings — in the way the HTML spec is. But I guess more generally, that’s an issue for Bikeshed (in that, Bikeshed currently doesn’t have a feature for automatically emitting explicit This section is non-normative text in the way that the HTML spec has.

@annevk annevk merged commit 12beda2 into master Sep 10, 2020
@annevk annevk deleted the annevk/event-introduction branch September 10, 2020 12:50
@annevk
Copy link
Member Author

annevk commented Sep 10, 2020

I'll leave that for a follow-up as that might require a more thorough review of the remainder of the specification.

@annevk
Copy link
Member Author

annevk commented Sep 10, 2020

Thanks again for your help in this @kevinsung!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

"When an event is dispatched to an object that p..."
3 participants