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

Editorial: initialize clearTargets in event dispatch correctly #1347

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

annevk
Copy link
Member

@annevk annevk commented Jan 6, 2025

Also clean up "for each" wording while here.

Fixes #1344.


Preview | Diff

Also clean up "for each" wording while here.

Fixes #1344.
@annevk annevk requested a review from domenic January 6, 2025 13:37
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Optional nit

<li><p>If <var>clearTargetsStruct</var>'s <a for=Event/path>shadow-adjusted target</a>,
<var>clearTargetsStruct</var>'s <a for=Event/path>relatedTarget</a>, or an {{EventTarget}} object
in <var>clearTargetsStruct</var>'s <a for=Event/path>touch target list</a> is a <a for=/>node</a>
whose <a for=tree>root</a> is a <a for=/>shadow root</a>: set <var>clearTargets</var> to true.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
whose <a for=tree>root</a> is a <a for=/>shadow root</a>: set <var>clearTargets</var> to true.
whose <a for=tree>root</a> is a <a for=/>shadow root</a>, then set <var>clearTargets</var> to true.

Copy link
Member Author

Choose a reason for hiding this comment

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

I did this deliberately as I thought using a colon here would make it clearer. In particular because the clause following "or" is rather long. WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, either way seems OK, it's just a bit unusual and I thought ", then" was also distinctive enough.

@annevk annevk merged commit 369654b into main Jan 15, 2025
2 checks passed
@annevk annevk deleted the annevk/cleartargets branch January 15, 2025 08:48
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.

Event::dispatch uses possibly uninitialized clearTargets
2 participants