Skip to content

Commit ec59294

Browse files
committed
Propagate events into the event's source's tree where appropriate.
- Add the concept of a "source" for an Event. - Modify shadow root's "get the parent" algorithm such that events propagate into the event's source's tree where appropriate.
1 parent 388779b commit ec59294

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

dom.bs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,9 @@ signaling that something has occurred, e.g., that an image has completed downloa
401401
<p class=note>Other specifications use <a for=Event>relatedTarget</a> to define a
402402
<code>relatedTarget</code> attribute. [[UIEVENTS]]
403403

404+
<p>An <a>event</a> has an associated <dfn export for=Event>source</dfn> (a
405+
<a>potential event target</a>). Unless stated otherwise it is null.
406+
404407
<p>An <a>event</a> has an associated <dfn export for=Event>touch target list</dfn> (a
405408
<a for=/>list</a> of zero or more <a>potential event targets</a>). Unless stated otherwise it is the
406409
empty list.
@@ -6398,10 +6401,22 @@ is null.
63986401
<hr>
63996402

64006403
<p>A <a for=/>shadow root</a>'s <a>get the parent</a> algorithm, given an <var>event</var>, returns
6401-
null if <var>event</var>'s <a>composed flag</a> is unset and <a for=/>shadow root</a> is the
6402-
<a for=tree>root</a> of <var>event</var>'s <a for=Event>path</a>'s first struct's
6403-
<a for=Event/path>invocation target</a>; otherwise <a for=/>shadow root</a>'s
6404-
<a for=DocumentFragment>host</a>.
6404+
the result of the following steps:</p>
6405+
6406+
<ol>
6407+
<li><p>If <var>event</var>’s <a>composed flag</a> is set, return <a for=/>shadow root</a>’s
6408+
<a for=DocumentFragment>host</a>.</p></li>
6409+
<li><p>Let <var>target</var> be <var>event</var>’s <a for=Event>path</a>'s first struct's
6410+
<a for=Event/path>invocation target</a>.</p></li>
6411+
<li><p>Let <var>source</var> be <var>event</var>'s <a for=Event>source</a>.</p></li>
6412+
<li><p>If <a for=/>shadow root</a> is not the <a for=tree>root</a> of <var>target</var>, and either
6413+
<var>source</var> is null or <a for=/>shadow root</a> is not the <a for=tree>root</a> of
6414+
<var>source</var>, return <a for=/>shadow root</a>'s <a for=DocumentFragment>host</a>.</p></li>
6415+
<li><p>If <var>source</var> is not null, and <var>source</var>'s <a for=tree>root</a> is a
6416+
<a>shadow-including ancestor</a> of <a for=/>shadow root</a>, return the result of
6417+
<a>retargeting</a> <var>target</var> against <var>source</var>.</p></li>
6418+
<li><p>Return null.</p></li>
6419+
</ol>
64056420

64066421
<hr>
64076422

0 commit comments

Comments
 (0)