Skip to content

Commit 18bb256

Browse files
committed
correct shadow root registry inheritance and constructor map
1 parent a5a8c4c commit 18bb256

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

source

+16-19
Original file line numberDiff line numberDiff line change
@@ -3203,7 +3203,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
32033203
<li><dfn data-x-href="https://dom.spec.whatwg.org/#concept-node-document">node document</dfn> concept</li>
32043204
<li><dfn data-x="concept-document-type" data-x-href="https://dom.spec.whatwg.org/#concept-document-type">document type</dfn> concept</li>
32053205
<li><dfn data-x="concept-DocumentFragment-host" data-x-href="https://dom.spec.whatwg.org/#concept-documentfragment-host">host</dfn> concept</li>
3206-
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-root">shadow root</dfn> concept, and its <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-delegates-focus">delegates focus</dfn>, <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-available-to-element-internals">available to element internals</dfn>, <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-clonable">clonable</dfn>, <dfn data-x="shadow-serializable" data-x-href="https://dom.spec.whatwg.org/#shadowroot-serializable">serializable</dfn>, and <dfn data-x="shadow-root-custom-element-registry" data-x-href="https://whatpr.org/dom/1341.html#shadowroot-custom-element-registry">custom element registry</dfn>.</li>
3206+
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-root">shadow root</dfn> concept, and its <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-delegates-focus">delegates focus</dfn>, <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-available-to-element-internals">available to element internals</dfn>, <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-clonable">clonable</dfn>, <dfn data-x="shadow-serializable" data-x-href="https://dom.spec.whatwg.org/#shadowroot-serializable">serializable</dfn>, <dfn data-x="shadow-root-custom-element-registry" data-x-href="https://whatpr.org/dom/1341.html#shadowroot-custom-element-registry">custom element registry</dfn>, and <dfn data-x="https://whatpr.org/dom/1341.html#shadowroot-keep-custom-element-registry-null">keep custom element registry null</dfn>.</li>
32073207
<!-- XXX xref -->
32083208
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#element-shadow-host">shadow host</dfn> concept</li>
32093209
<li><dfn data-x-href="https://dom.spec.whatwg.org/#interface-htmlcollection"><code>HTMLCollection</code></dfn> interface, its
@@ -12071,14 +12071,14 @@ document.createElement("bad-1"); // (2)</code></pre>
1207112071
<li><p>Let <var>registry</var> be null.</p></li>
1207212072

1207312073
<li>
12074-
<p>If <span>current global object</span>'s <span>active custom element constructor
12074+
<p>If the <span>surrounding agent</span>'s <span>active custom element constructor
1207512075
map</span>[<span>NewTarget</span>] <span data-x="map exists">exists</span>:</p>
1207612076

1207712077
<ol>
12078-
<li><p>Set <var>registry</var> to <span>current global object</span>'s <span>active custom
12078+
<li><p>Set <var>registry</var> to the <span>surrounding agent</span>'s <span>active custom
1207912079
element constructor map</span>[<span>NewTarget</span>].</p></li>
1208012080

12081-
<li><p><span data-x="map remove">Remove</span> <span>current global object</span>'s
12081+
<li><p><span data-x="map remove">Remove</span> the <span>surrounding agent</span>'s
1208212082
<span>active custom element constructor map</span>[<span>NewTarget</span>].</p></li>
1208312083
</ol>
1208412084

@@ -72692,9 +72692,9 @@ document.body.append(parent);
7269272692

7269372693
<div w-nodev>
7269472694

72695-
<p>Each <code>Window</code> object has an associated <dfn export for="Window">active custom
72696-
element constructor map</dfn>, which is a <span data-x="ordered map">map</span> of constructors to
72697-
<code>CustomElementRegistry</code> objects.</p>
72695+
<p>Each <span>similar-origin window agent</span> has an associated <dfn export for="similar-origin
72696+
window agent">active custom element constructor map</dfn>, which is a <span data-x="ordered
72697+
map">map</span> of constructors to <code>CustomElementRegistry</code> objects.</p>
7269872698

7269972699
<p>The <dfn attribute for="Window"><code
7270072700
data-x="dom-window-customElements">customElements</code></dfn> attribute of the
@@ -72711,8 +72711,8 @@ interface <dfn interface>CustomElementRegistry</dfn> {
7271172711
<span data-x="idl-Promise">Promise</span>&lt;<span>CustomElementConstructor</span>&gt; <span data-x="dom-CustomElementRegistry-whenDefined">whenDefined</span>(DOMString <var>name</var>);
7271272712
[<span>CEReactions</span>] undefined <span data-x="dom-CustomElementRegistry-upgrade">upgrade</span>(<span>Node</span> <var>root</var>);
7271372713

72714-
<span>HTMLElement</span> <span data-x="dom-CustomElementRegistry-createElement">createElement</span>(DOMString <var>name</var>);
72715-
<span>Node</span> <span data-x="dom-CustomElementRegistry-cloneSubtree">cloneSubtree</span>(<span>Node</span> <var>root</var>);
72714+
[<span>CEReactions</span>, NewObject] <span>HTMLElement</span> <span data-x="dom-CustomElementRegistry-createElement">createElement</span>(DOMString <var>name</var>);
72715+
[<span>CEReactions</span>, NewObject] <span>Node</span> <span data-x="dom-CustomElementRegistry-cloneSubtree">cloneSubtree</span>(<span>Node</span> <var>root</var>);
7271672716
};
7271772717

7271872718
callback <dfn callback>CustomElementConstructor</dfn> = <span>HTMLElement</span> ();
@@ -73253,9 +73253,8 @@ customElements.define("x-foo", class extends HTMLElement {
7325373253
<li><p>Let <var>registry</var> be <var>element</var>'s <span
7325473254
data-x="element-custom-element-registry">custom element registry</span>.</p></li>
7325573255

73256-
<li><p><span data-x="map set">Set</span> <var>registry</var>'s <span>relevant global
73257-
object</span>'s <span>active custom element constructor map</span>[<var>C</var>] to
73258-
<var>registry</var>.</p></li>
73256+
<li><p><span data-x="map set">Set</span> the <span>surrounding agent</span>'s <span>active custom
73257+
element constructor map</span>[<var>C</var>] to <var>registry</var>.</p></li>
7325973258

7326073259
<li>
7326173260
<p>Run the following steps while catching any exceptions:</p>
@@ -130231,13 +130230,6 @@ document.body.appendChild(text);
130231130230
data-x="attr-template-shadowrootdelegatesfocus">shadowrootdelegatesfocus</code> attribute;
130232130231
otherwise false.</p></li>
130233130232

130234-
<li><p>Let <var>registry</var> be <var>declarative shadow host element</var>'s <span
130235-
data-x="element-custom-element-registry">custom element registry</span>.</p></li>
130236-
130237-
<li><p>If <var>template start tag</var> has a <code
130238-
data-x="attr-template-shadowrootcustomelementregistry">shadowrootcustomelementregistry</code>
130239-
attribute, then set <var>registry</var> to null.</p></li>
130240-
130241130233
<li><p>If <var>declarative shadow host element</var> is a <span>shadow host</span>, then
130242130234
<span>insert an element at the adjusted insertion location</span> with
130243130235
<var>template</var>.</p></li>
@@ -130274,6 +130266,11 @@ document.body.appendChild(text);
130274130266
<var>shadow</var>.</p></li>
130275130267

130276130268
<li><p>Set <var>shadow</var>'s <span>available to element internals</span> to true.</p></li>
130269+
130270+
<li><p>If <var>template start tag</var> has a <code
130271+
data-x="attr-template-shadowrootcustomelementregistry">shadowrootcustomelementregistry</code>
130272+
attribute, then set <var>shadow</var>'s <span>keep custom element registry null</span> to
130273+
true.</p></li>
130277130274
</ol>
130278130275
</li>
130279130276
</ol>

0 commit comments

Comments
 (0)