Permalink
Browse files

Make [CEReactions]'s treatment of exceptions explicit

Fixes #3217.
  • Loading branch information...
domenic committed Nov 17, 2017
1 parent 3a413b6 commit 8b055c0497070731c526e8c0bb655af65fb4e10e
Showing with 20 additions and 11 deletions.
  1. +20 −11 source
View
31 source
@@ -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>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

0 comments on commit 8b055c0

Please sign in to comment.