From a61b11a8521e6e97c9e1521af2151c8a031d6d2b Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Thu, 16 Nov 2017 19:23:01 -0500 Subject: [PATCH] Make [CEReactions]'s treatment of exceptions explicit Fixes #3217. --- source | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/source b/source index 249890067f8..8f0817c1886 100755 --- a/source +++ b/source @@ -66943,19 +66943,28 @@ customElements.define("x-foo", class extends HTMLElement { Additionally, it must not appear on readonly attributes.

Operations, attributes, setters, or deleters annotated with the [CEReactions] extended attribute must run the following steps - surrounding the actions listed in the description of the operation, setter, deleter, or the - attribute's setter:

+ data-x="CEReactions">[CEReactions] extended attribute must run the following steps in place + of the ones specified in their description:

-
-
Before executing the listed actions
-
Push a new element queue onto the custom element reactions - stack.
+
    +
  1. Push a new element queue onto the + custom element reactions stack.

  2. -
    After executing the listed actions
    -
    Pop the element queue from the custom element reactions stack, and - invoke custom element reactions in that queue.
    -
+
  • Run the originally-specified steps for this construct, catching any exceptions. If the + steps return a value, let value be the returned value. If they throw an exception, let + exception be the thrown exception.

  • + +
  • Let queue be the result of popping from the + custom element reactions stack.

  • + +
  • Invoke custom element reactions in queue.

  • + +
  • If an exception exception was thrown by the original steps, rethrow + exception.

  • + +
  • Otherwise, if a value value was returned from the original steps, return + value.

  • +

    The intent behind this extended attribute is somewhat subtle. One way of accomplishing its