Skip to content

Commit

Permalink
Make [CEReactions]'s treatment of exceptions explicit
Browse files Browse the repository at this point in the history
Fixes #3217.
  • Loading branch information
domenic committed Nov 17, 2017
1 parent 3a413b6 commit 2d49253
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -66945,19 +66945,28 @@ customElements.define("x-foo", class extends HTMLElement {
Additionally, it must not appear on readonly attributes.</p>

<p>Operations, attributes, setters, or deleters annotated with the <code
data-x="CEReactions">[CEReactions]</code> extended attribute must run the following steps
surrounding the actions listed in the description of the operation, setter, deleter, or the
attribute's setter:</p>
data-x="CEReactions">[CEReactions]</code> extended attribute must run the following steps in place
of the ones specified in their description:</p>

<dl>
<dt>Before executing the listed actions</dt>
<dd>Push a new <span>element queue</span> onto the <span>custom element reactions
stack</span>.</dd>
<ol>
<li><p><span data-x="stack push">Push</span> a new <span>element queue</span> onto the
<span>custom element reactions stack</span>.</p></li>

<dt>After executing the listed actions</dt>
<dd>Pop the <span>element queue</span> from the <span>custom element reactions stack</span>, and
<span>invoke custom element reactions</span> in that queue.</dd>
</dl>
<li><p>Run the originally-specified steps for this construct, catching any exceptions. If the
steps return a value, let <var>value</var> be the returned value. If they throw an exception, let
<var>exception</var> be the thrown exception.</p></li>

<li><p>Let <var>queue</var> be the result of <span data-x="stack pop">popping</span> from the
<span>custom element reactions stack</span>.</p></li>

<li><p><span>Invoke custom element reactions</span> in <var>queue</var>.</p></li>

<li><p>If an exception <var>exception</var> was thrown by the original steps, rethrow
<var>exception</var>.</p></li>

<li><p>Otherwise, if a value <var>value</var> was returned from the original steps, return
<var>value</var>.</p></li>
</ol>

<div class="note">
<p>The intent behind this extended attribute is somewhat subtle. One way of accomplishing its
Expand Down

0 comments on commit 2d49253

Please sign in to comment.