Skip to content

Commit 20a7295

Browse files
committed
Clarify that window.customElements always returns an object
Fixes #11220.
1 parent 689dace commit 20a7295

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

source

+17-4
Original file line numberDiff line numberDiff line change
@@ -73696,10 +73696,23 @@ document.body.append(parent);
7369673696
map">map</span> of constructors to <code>CustomElementRegistry</code> objects.</p>
7369773697

7369873698
<p>The <code>Window</code> <dfn attribute for="Window"><code
73699-
data-x="dom-window-customElements">customElements</code></dfn> getter steps are to return
73700-
<span>this</span>'s <span data-x="concept-document-window">associated
73701-
<code>Document</code></span>'s <span data-x="document-custom-element-registry">custom element
73702-
registry</span>.</p>
73699+
data-x="dom-window-customElements">customElements</code></dfn> getter steps are:</p>
73700+
73701+
<ol>
73702+
<li>
73703+
<p><span>Assert</span>: <span>this</span>'s <span data-x="concept-document-window">associated
73704+
<code>Document</code></span>'s <span data-x="document-custom-element-registry">custom element
73705+
registry</span> is a <code>CustomElementRegistry</code> object.</p>
73706+
73707+
<p class="note">A <code>Window</code>'s <span data-x="concept-document-window">associated
73708+
<code>Document</code></span> is always created with a new
73709+
<code>CustomElementRegistry</code> object.</p>
73710+
</li>
73711+
73712+
<li><p>Return <span>this</span>'s <span data-x="concept-document-window">associated
73713+
<code>Document</code></span>'s <span data-x="document-custom-element-registry">custom element
73714+
registry</span>.</p></li>
73715+
</ol>
7370373716

7370473717
<pre><code class="idl">[Exposed=Window]
7370573718
interface <dfn interface>CustomElementRegistry</dfn> {

0 commit comments

Comments
 (0)