Skip to content

Commit 98564fc

Browse files
committed
Non-bubbling event should run non-capture listeners
This fixes a regression from #686. Tests: various tests were failing because of this. web-platform-tests/wpt#16307 aligns the remaining failing test with the new model. Fixes #742.
1 parent 7a8406b commit 98564fc

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

dom.bs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,15 +1405,21 @@ for discussion).
14051405
</ol>
14061406

14071407
<li>
1408-
<p>If <var>event</var>'s {{Event/bubbles}} attribute is true, then <a for=list>for each</a>
1409-
<var>struct</var> in <var>event</var>'s <a for=Event>path</a>:
1408+
<p><a for=list>For each</a> <var>struct</var> in <var>event</var>'s <a for=Event>path</a>:
14101409

14111410
<ol>
14121411
<li><p>If <var>struct</var>'s <a for=Event/path>target</a> is non-null, then set
14131412
<var>event</var>'s {{Event/eventPhase}} attribute to {{Event/AT_TARGET}}.
14141413

1415-
<li><p>Otherwise, set <var>event</var>'s {{Event/eventPhase}} attribute to
1416-
{{Event/BUBBLING_PHASE}}.
1414+
<li>
1415+
<p>Otherwise:
1416+
1417+
<ol>
1418+
<li><p>If <var>event</var>'s {{Event/bubbles}} attribute is false, then
1419+
<a for=iteration>continue</a>.
1420+
1421+
<li><p>Set <var>event</var>'s {{Event/eventPhase}} attribute to {{Event/BUBBLING_PHASE}}.
1422+
</ol>
14171423

14181424
<li><p><a>Invoke</a> with <var>struct</var>, <var>event</var>, "<code>bubbling</code>", and
14191425
<var>legacyOutputDidListenersThrowFlag</var> if given.

0 commit comments

Comments
 (0)