Re: [whatwg/dom] Add reference target to shadow root (PR #1353)

@annevk commented on this pull request.



> @@ -1743,7 +1743,8 @@ and an optional <var>legacyOutputDidListenersThrowFlag</var>, run these steps:
 <div algorithm>
 <p>To <dfn export id=concept-event-fire>fire an event</dfn> named <var>e</var> at <var>target</var>,
 optionally using an <var>eventConstructor</var>, with a description of how IDL attributes are to be
-initialized, and a <var>legacy target override flag</var>, run these steps:
+initialized, and a <var>legacy target override flag</var> and an optional <var>relatedTarget</var>,
+run these steps:

Too many "and"s and a missing Oxford comma. And if we are going to repeat optional (which is probably a good idea) we should add it in front of the flag too. But that also means we need to make this a named parameter since we probably want to pass this without passing the constructor or the flag. https://infra.spec.whatwg.org/#algorithm-params details conventions.

We can also drop "run these steps" to modernize.

> @@ -1754,6 +1755,9 @@ initialized, and a <var>legacy target override flag</var>, run these steps:
 
  <li><p>Initialize <var>event</var>'s {{Event/type}} attribute to <var>e</var>.
 
+ <li><p>If <var>relatedTarget</var> is given, set <var>event</var>'s <a for=Event>relatedTarget</a>

then set

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1353#pullrequestreview-4424988164
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1353/review/4424988164@github.com>

Received on Thursday, 4 June 2026 05:13:17 UTC