Skip to content

Commit e3431e0

Browse files
committed
add initializeSubtree and make innerHTML work
1 parent 2c69d78 commit e3431e0

File tree

1 file changed

+46
-9
lines changed

1 file changed

+46
-9
lines changed

source

+46-9
Original file line numberDiff line numberDiff line change
@@ -72713,6 +72713,7 @@ interface <dfn interface>CustomElementRegistry</dfn> {
7271372713

7271472714
[<span>CEReactions</span>, NewObject] <span>HTMLElement</span> <span data-x="dom-CustomElementRegistry-createElement">createElement</span>(DOMString <var>name</var>);
7271572715
[<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>);
7271672717
};
7271772718

7271872719
callback <dfn callback>CustomElementConstructor</dfn> = <span>HTMLElement</span> ();
@@ -72816,7 +72817,11 @@ dictionary <dfn dictionary>ElementDefinitionOptions</dfn> {
7281672817

7281772818
<dt><code data-x=""><var>registry</var>.<span subdfn data-x="dom-CustomElementRegistry-cloneSubtree">cloneSubtree</span>(<var>root</var>)</code></dt>
7281872819
<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>
7282072825
</dl>
7282172826

7282272827
<p w-nodev>The <dfn
@@ -73173,10 +73178,40 @@ console.assert(el instanceof SpiderMan); // upgraded!</code></pre>
7317373178

7317473179
<p>The <dfn method for="CustomElementRegistry"><code
7317573180
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>
7318073215

7318173216

7318273217
<h4><dfn data-x="custom-element-upgrades">Upgrades</dfn></h4>
@@ -129333,7 +129368,8 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {
129333129368
<li><p>Let <var>is</var> be the value of the "<code data-x="attr-is">is</code>" attribute in the
129334129369
given token, if such an attribute exists, or null otherwise.</p></li>
129335129370

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>
129337129373

129338129374
<li><p>Let <var>definition</var> be the result of <span data-x="look up a custom element
129339129375
definition">looking up a custom element definition</span> given <var>registry</var>, <var>given
@@ -134512,9 +134548,10 @@ console.assert(container.firstChild instanceof SuperP);
134512134548
transitions.</p>
134513134549
</li>
134514134550

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>
134518134555

134519134556
<li>
134520134557
<p>Append the element <var>root</var> to the <code>Document</code> node created

0 commit comments

Comments
 (0)