@@ -72713,6 +72713,7 @@ interface <dfn interface>CustomElementRegistry</dfn> {
72713
72713
72714
72714
[<span>CEReactions</span>, NewObject] <span>HTMLElement</span> <span data-x="dom-CustomElementRegistry-createElement">createElement</span>(DOMString <var>name</var>);
72715
72715
[<span>CEReactions</span>, NewObject] <span>Node</span> <span data-x="dom-CustomElementRegistry-cloneSubtree">cloneSubtree</span>(<span>Node</span> <var>root</var>);
72716
+ undefined <span data-x="dom-CustomElementRegistry-initializeSubtree">initializeSubtree</span>((<span>Element</span> or <span>ShadowRoot</span>) <var>root</var>);
72716
72717
};
72717
72718
72718
72719
callback <dfn callback>CustomElementConstructor</dfn> = <span>HTMLElement</span> ();
@@ -72816,7 +72817,11 @@ dictionary <dfn dictionary>ElementDefinitionOptions</dfn> {
72816
72817
72817
72818
<dt><code data-x=""><var>registry</var>.<span subdfn data-x="dom-CustomElementRegistry-cloneSubtree">cloneSubtree</span>(<var>root</var>)</code></dt>
72818
72819
<dd>Returns a copy of <var>root</var>, changing the registry from <var>root</var>'s inclusive
72819
- descendants from null (if any) to <var>registry</var> in the process.
72820
+ descendants from null (if any) to <var>registry</var> in the process.</dd>
72821
+
72822
+ <dt><code data-x=""><var>registry</var>.<span subdfn data-x="dom-CustomElementRegistry-initializeSubtree">initializeSubtree</span>(<var>root</var>)</code></dt>
72823
+ <dd>Each <span>inclusive descendant</span> of <var>root</var> with a null registry will have it
72824
+ updated to this <code>CustomElementRegistry</code> object.</dd>
72820
72825
</dl>
72821
72826
72822
72827
<p w-nodev>The <dfn
@@ -73173,10 +73178,40 @@ console.assert(el instanceof SpiderMan); // upgraded!</code></pre>
73173
73178
73174
73179
<p>The <dfn method for="CustomElementRegistry"><code
73175
73180
data-x="dom-CustomElementRegistry-cloneSubtree">cloneSubtree(<var>root</var>)</code></dfn>
73176
- method steps are to return the result of <span data-x="concept-node-clone">cloning a node</span>
73177
- given <var>root</var> with <span data-x="concept-node-clone-subtree"><i>subtree</i></span> set to
73178
- true and <span data-x="concept-node-clone-fallbackRegistry"><i>fallbackRegistry</i></span> set
73179
- <span>this</span>.</p>
73181
+ method steps are:</p>
73182
+
73183
+ <ol>
73184
+ <li><p>If <var>root</var> is a <code>Document</code> or <code>ShadowRoot</code> object, then
73185
+ throw a <span>"<code>NotSupportedError</code>"</span> <code>DOMException</code>.</p></li>
73186
+
73187
+ <li><p>Return the result of <span data-x="concept-node-clone">cloning a node</span> given
73188
+ <var>root</var> with <span data-x="concept-node-clone-subtree"><i>subtree</i></span> set to true
73189
+ and <span data-x="concept-node-clone-fallbackRegistry"><i>fallbackRegistry</i></span> set
73190
+ <span>this</span>.</p></li>
73191
+ </ol>
73192
+
73193
+ <p>The <dfn method for="CustomElementRegistry"><code
73194
+ data-x="dom-CustomElementRegistry-initializeSubtree">initializeSubtree(<var>root</var>)</code></dfn>
73195
+ method steps are:</p>
73196
+
73197
+ <ol>
73198
+ <li>
73199
+ <p>For each <span>inclusive descendant</span> <var>inclusiveDescendant</var> of
73200
+ <var>root</var>:</p>
73201
+
73202
+ <ol>
73203
+ <li><p>If <var>inclusiveDescendant</var> is an <code>Element</code> node whose <span
73204
+ data-x="element-custom-element-registry">custom element registry</span> is null, then set
73205
+ <var>inclusiveDescendant</var>'s <span data-x="element-custom-element-registry">custom element
73206
+ registry</span> to <span>this</span>.</p></li>
73207
+
73208
+ <li><p>Otherwise, if <var>inclusiveDescendant</var> is a <code>ShadowRoot</code> node whose
73209
+ <span data-x="shadow-root-custom-element-registry">custom element registry</span> is null, set
73210
+ <var>inclusiveDescendant</var>'s <span data-x="shadow-root-custom-element-registry">custom
73211
+ element registry</span> to <span>this</span>.</p></li>
73212
+ </ol>
73213
+ </li>
73214
+ </ol>
73180
73215
73181
73216
73182
73217
<h4><dfn data-x="custom-element-upgrades">Upgrades</dfn></h4>
@@ -129333,7 +129368,8 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {
129333
129368
<li><p>Let <var>is</var> be the value of the "<code data-x="attr-is">is</code>" attribute in the
129334
129369
given token, if such an attribute exists, or null otherwise.</p></li>
129335
129370
129336
- <li class="XXX"><p>Obtain <var>registry</var> from the parser context.</p></li>
129371
+ <li><p>Let <var>registry</var> be the result of <span data-x="look up a custom element
129372
+ registry">looking up a custom element registry</span> given <var>intended parent</var>.</p></li>
129337
129373
129338
129374
<li><p>Let <var>definition</var> be the result of <span data-x="look up a custom element
129339
129375
definition">looking up a custom element definition</span> given <var>registry</var>, <var>given
@@ -134512,9 +134548,10 @@ console.assert(container.firstChild instanceof SuperP);
134512
134548
transitions.</p>
134513
134549
</li>
134514
134550
134515
- <li>
134516
- <p>Let <var>root</var> be a new <code>html</code> element with no attributes.</p>
134517
- </li>
134551
+ <li><p>Let <var>root</var> be the result of <span>creating an element</span> given the
134552
+ <code>Document</code> node created above, "<code data-x="">html</code>", the <span>HTML
134553
+ namespace</span>, null, null, false, and <var>context</var>'s <span
134554
+ data-x="element-custom-element-registry">custom element registry</span>.</p></li>
134518
134555
134519
134556
<li>
134520
134557
<p>Append the element <var>root</var> to the <code>Document</code> node created
0 commit comments