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

@annevk commented on this pull request.



> @@ -7738,7 +7763,8 @@ are:
  <var>init</var>["{{ShadowRootInit/mode}}"], <var>init</var>["{{ShadowRootInit/clonable}}"],
  <var>init</var>["{{ShadowRootInit/serializable}}"],
  <var>init</var>["{{ShadowRootInit/delegatesFocus}}"],
- <var>init</var>["{{ShadowRootInit/slotAssignment}}"], and <var>registry</var>.
+ <var>init</var>["{{ShadowRootInit/slotAssignment}}"], and
+ <var>init</var>["{{ShadowRootInit/referenceTarget}}"], and <var>registry</var>.

double and

> @@ -6603,10 +6611,22 @@ is null.
 <hr>
 
 <p>A <a for=/>shadow root</a>'s <a>get the parent</a> algorithm, given an <var>event</var>, returns
-null if <var>event</var>'s <a>composed flag</a> is unset and <a for=/>shadow root</a> is the
-<a for=tree>root</a> of <var>event</var>'s <a for=Event>path</a>'s first struct's
-<a for=Event/path>invocation target</a>; otherwise <a for=/>shadow root</a>'s
-<a for=DocumentFragment>host</a>.
+the result of the following steps:</p>
+
+<ol>
+ <li><p>If <var>event</var>’s <a>composed flag</a> is set, return <a for=/>shadow root</a>’s

We don't use smart quotes. (This happens three times in this PR I believe.)

> @@ -6603,10 +6611,22 @@ is null.
 <hr>
 
 <p>A <a for=/>shadow root</a>'s <a>get the parent</a> algorithm, given an <var>event</var>, returns
-null if <var>event</var>'s <a>composed flag</a> is unset and <a for=/>shadow root</a> is the
-<a for=tree>root</a> of <var>event</var>'s <a for=Event>path</a>'s first struct's
-<a for=Event/path>invocation target</a>; otherwise <a for=/>shadow root</a>'s
-<a for=DocumentFragment>host</a>.
+the result of the following steps:</p>

We should add `<div algorithm="shadow root's get the parent">` around this.

> @@ -479,6 +479,9 @@ signaling that something has occurred, e.g., that an image has completed downloa
 <p class=note>Other specifications use <a for=Event>relatedTarget</a> to define a
 <code>relatedTarget</code> attribute. [[UIEVENTS]]
 
+<p>An <a>event</a> has an associated <dfn export for=Event>source</dfn> (a
+<a>potential event target</a>). Unless stated otherwise it is null.

This should probably have a note explaining where this is used. "Other specifications ..."

> @@ -6603,10 +6611,22 @@ is null.
 <hr>
 
 <p>A <a for=/>shadow root</a>'s <a>get the parent</a> algorithm, given an <var>event</var>, returns
-null if <var>event</var>'s <a>composed flag</a> is unset and <a for=/>shadow root</a> is the
-<a for=tree>root</a> of <var>event</var>'s <a for=Event>path</a>'s first struct's
-<a for=Event/path>invocation target</a>; otherwise <a for=/>shadow root</a>'s
-<a for=DocumentFragment>host</a>.
+the result of the following steps:</p>
+
+<ol>
+ <li><p>If <var>event</var>’s <a>composed flag</a> is set, return <a for=/>shadow root</a>’s
+ <a for=DocumentFragment>host</a>.</p></li>

We don't have these optional closing tags in this specification. (Applies quite a few times.)

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

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

Received on Wednesday, 20 May 2026 16:59:22 UTC