Skip to content

Commit

Permalink
Non-bubbling event should run non-capture listeners
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
annevk committed Apr 15, 2019
1 parent 7a8406b commit 98564fc
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions dom.bs
Expand Up @@ -1405,15 +1405,21 @@ for discussion).
</ol>

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

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

<li><p>Otherwise, set <var>event</var>'s {{Event/eventPhase}} attribute to
{{Event/BUBBLING_PHASE}}.
<li>
<p>Otherwise:

<ol>
<li><p>If <var>event</var>'s {{Event/bubbles}} attribute is false, then
<a for=iteration>continue</a>.

<li><p>Set <var>event</var>'s {{Event/eventPhase}} attribute to {{Event/BUBBLING_PHASE}}.
</ol>

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

0 comments on commit 98564fc

Please sign in to comment.