From bb93fad504dd5012fe480ce3894c1ad9a43ce53a Mon Sep 17 00:00:00 2001
From: Anne van Kesteren Each unit of related similar-origin browsing contexts has a custom element
- reactions stack, which is initially empty. The current element queue is the
- element queue at the top of the custom element reactions stack. Each
- item in the stack is an element queue, which is initially empty as well. Each item in
- an element queue is an element. (The elements are not necessarily custom yet, since this queue is used for Each similar-origin window agent has a custom element reactions stack,
+ which is initially empty. A similar-origin window agent's current element
+ queue is the element queue at the top of its custom element reactions
+ stack. Each item in the stack is an element queue, which is initially empty as
+ well. Each item in an element queue is an element. (The elements are not necessarily
+ custom yet, since this queue is used for upgrades as well.) Each custom element reactions stack has an associated backup element
@@ -67088,31 +67088,38 @@ customElements.define("x-foo", class extends HTMLElement {
element, run the following steps: Let reactionsStack be element's relevant agent's
+ custom element reactions stack. If the custom element reactions stack is empty, then: If reactionsStack is empty, then: Add element to the backup element queue. Add element to reactionsStack's backup element
+ queue. If the processing the backup element queue flag is set, then
- return. If reactionsStack's processing the backup element queue flag is
+ set, then return. Set the processing the backup element queue flag. Set reactionsStack's processing the backup element queue
+ flag. Queue a microtask to perform the following steps: Invoke custom element reactions in the backup element
- queue. Invoke custom element reactions in reactionsStack's
+ backup element queue. Unset the processing the backup element queue flag. Unset reactionsStack's processing the backup element queue
+ flag. Otherwise, add element to the current element queue. Otherwise, add element to element's relevant agent's
+ current element queue. To enqueue a custom element callback reaction, given a custom
@@ -67218,15 +67225,15 @@ customElements.define("x-foo", class extends HTMLElement {
of the ones specified in their description: Push a new element queue onto the
- custom element reactions stack. Push a new element queue onto this object's
+ relevant agent's custom element reactions stack. 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. Let queue be the result of popping from this
+ object's relevant agent's custom element reactions stack. Invoke custom element reactions in queue. If the JavaScript execution context stack is empty, then perform a
microtask checkpoint. Push a new element queue onto the custom element reactions
- stack. Push a new element queue onto document's relevant
+ agent's custom element reactions stack. If will execute script is true, then: Let queue be the result of popping the current element queue
- from the custom element reactions stack. (This will be the same element
- queue as was pushed above.) Let queue be the result of popping from document's relevant
+ agent's custom element reactions stack. (This will be the same
+ element queue as was pushed above.) Invoke custom element reactions in queue. If the parser was not created as part of the HTML fragment parsing
- algorithm, then push a new element queue onto the custom element
- reactions stack. Insert element at the adjusted insertion location. If the parser was not created as part of the HTML fragment parsing
- algorithm, then pop the element queue from the custom element
- reactions stack, and invoke custom element reactions in that
- queue.
-
+
-
-
-
@@ -105919,9 +105926,9 @@ dictionary StorageEventInit : EventInit {
-
If the adjusted insertion location cannot accept more