Skip to content

Commit 9e38ff4

Browse files
domenicannevk
authored andcommitted
Rename "CustomElementsRegistry" to "CustomElementRegistry"
Fixes WICG/webcomponents#548.
1 parent ca818ee commit 9e38ff4

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

source

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9754,7 +9754,7 @@ interface <dfn>HTMLUnknownElement</dfn> : <span>HTMLElement</span> { };</pre>
97549754

97559755
<ol>
97569756
<li><p>Let <var>registry</var> be the <span>current global object</span>'s
9757-
<code>CustomElementsRegistry</code> object.</p></li>
9757+
<code>CustomElementRegistry</code> object.</p></li>
97589758

97599759
<li>
97609760
<p>If NewTarget is equal to the <span>active function object</span>, then throw a
@@ -66327,7 +66327,7 @@ console.log(plasticButton2.getAttribute("is")); // will output "plastic-button"<
6632766327

6632866328
<li><p>Let <var>registry</var> be <var>document</var>'s <span
6632966329
data-x="concept-document-bc">browsing context</span>'s <code>Window</code>'s
66330-
<code>CustomElementsRegistry</code> object.</p></li>
66330+
<code>CustomElementRegistry</code> object.</p></li>
6633166331

6633266332
<li><p>If there is <span>custom element definition</span> in <var>registry</var> with <span
6633366333
data-x="concept-custom-element-definition-name">name</span> and <span
@@ -66342,10 +66342,10 @@ console.log(plasticButton2.getAttribute("is")); // will output "plastic-button"<
6634266342
<li><p>Return null.</p></li>
6634366343
</ol>
6634466344

66345-
<h4 id="custom-elements-api">The <code>CustomElementsRegistry</code> interface</h4>
66345+
<h4 id="custom-elements-api">The <code>CustomElementRegistry</code> interface</h4>
6634666346

6634766347
<p>Each <code>Window</code> object is associated with a unique instance of a
66348-
<code>CustomElementsRegistry</code> object, allocated when the <code>Window</code> object is
66348+
<code>CustomElementRegistry</code> object, allocated when the <code>Window</code> object is
6634966349
created.</p>
6635066350

6635166351
<p class="note">Custom element registries are associated with <code>Window</code> objects, instead
@@ -66354,46 +66354,46 @@ console.log(plasticButton2.getAttribute("is")); // will output "plastic-button"<
6635466354
interface per <code>Window</code> object.</p>
6635566355

6635666356
<p>The <dfn><code data-x="dom-window-customElements">customElements</code></dfn> attribute of the
66357-
<code>Window</code> interface must return the <code>CustomElementsRegistry</code> object for that
66357+
<code>Window</code> interface must return the <code>CustomElementRegistry</code> object for that
6635866358
<code>Window</code> object.</p>
6635966359

66360-
<pre class="idl">interface <dfn>CustomElementsRegistry</dfn> {
66361-
[<span>CEReactions</span>] void <span data-x="dom-CustomElementsRegistry-define">define</span>(DOMString name, Function constructor, optional ElementDefinitionOptions options);
66362-
any <span data-x="dom-CustomElementsRegistry-get">get</span>(DOMString name);
66363-
Promise&lt;void&gt; <span data-x="dom-CustomElementsRegistry-whenDefined">whenDefined</span>(DOMString name);
66360+
<pre class="idl">interface <dfn>CustomElementRegistry</dfn> {
66361+
[<span>CEReactions</span>] void <span data-x="dom-CustomElementRegistry-define">define</span>(DOMString name, Function constructor, optional ElementDefinitionOptions options);
66362+
any <span data-x="dom-CustomElementRegistry-get">get</span>(DOMString name);
66363+
Promise&lt;void&gt; <span data-x="dom-CustomElementRegistry-whenDefined">whenDefined</span>(DOMString name);
6636466364
};
6636566365

6636666366
dictionary <dfn>ElementDefinitionOptions</dfn> {
6636766367
DOMString extends;
6636866368
};</pre>
6636966369

66370-
<p>Every <code>CustomElementsRegistry</code> has a set of <span data-x="custom element
66370+
<p>Every <code>CustomElementRegistry</code> has a set of <span data-x="custom element
6637166371
definition">custom element definitions</span>, initially empty. In general, algorithms in this
6637266372
specification look up elements in the registry by any of <span
6637366373
data-x="concept-custom-element-definition-name">name</span>, <span
6637466374
data-x="concept-custom-element-definition-local-name">local name</span>, or <span
6637566375
data-x="concept-custom-element-definition-constructor">constructor</span>.</p>
6637666376

66377-
<p>Every <code>CustomElementsRegistry</code> also has an <dfn>element definition is running</dfn>
66377+
<p>Every <code>CustomElementRegistry</code> also has an <dfn>element definition is running</dfn>
6637866378
flag which is used to prevent reentrant invocations of <span>element definition</span>. It is
6637966379
initially unset.</p>
6638066380

66381-
<p>Every <code>CustomElementsRegistry</code> also has a <dfn>when-defined promise map</dfn>,
66381+
<p>Every <code>CustomElementRegistry</code> also has a <dfn>when-defined promise map</dfn>,
6638266382
mapping <span data-x="valid custom element name">valid custom element names</span> to promises. It
6638366383
is used to implement the <code
66384-
data-x="dom-CustomElementsRegistry-whenDefined">whenDefined()</code> method.</p>
66384+
data-x="dom-CustomElementRegistry-whenDefined">whenDefined()</code> method.</p>
6638566385

6638666386
<dl class="domintro">
6638766387
<dt><var>window</var> . <code data-x="dom-window-customElements">customElements</code> . <code
66388-
subdfn data-x="dom-CustomElementsRegistry-define">define</code>(<var>name</var>,
66388+
subdfn data-x="dom-CustomElementRegistry-define">define</code>(<var>name</var>,
6638966389
<var>constructor</var>)</dt>
6639066390

6639166391
<dd>Defines a new <span>custom element</span>, mapping the given name to the given constructor as
6639266392
an <span>autonomous custom element</span>.</dd>
6639366393

6639466394

6639566395
<dt><var>window</var> . <code data-x="dom-window-customElements">customElements</code> . <code
66396-
data-x="dom-CustomElementsRegistry-define">define</code>(<var>name</var>, <var>constructor</var>,
66396+
data-x="dom-CustomElementRegistry-define">define</code>(<var>name</var>, <var>constructor</var>,
6639766397
{ extends: <var>baseLocalName</var> })</dt>
6639866398

6639966399
<dd>Defines a new <span>custom element</span>, mapping the given name to the given constructor as
@@ -66403,15 +66403,15 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
6640366403
an unknown element.</dd>
6640466404

6640566405
<dt><var>window</var> . <code data-x="dom-window-customElements">customElements</code> . <code
66406-
subdfn data-x="dom-CustomElementsRegistry-get">get</code>(<var>name</var>)</dt>
66406+
subdfn data-x="dom-CustomElementRegistry-get">get</code>(<var>name</var>)</dt>
6640766407

6640866408
<dd>Retrieves the <span>custom element constructor</span> defined for the given <span
6640966409
data-x="concept-custom-element-definition-name">name</span>. Returns undefined if there is no
6641066410
<span>custom element definition</span> with the given <span
6641166411
data-x="concept-custom-element-definition-name">name</span>.</dd>
6641266412

6641366413
<dt><var>window</var> . <code data-x="dom-window-customElements">customElements</code> . <code
66414-
subdfn data-x="dom-CustomElementsRegistry-whenDefined">whenDefined</code>(<var>name</var>)</dt>
66414+
subdfn data-x="dom-CustomElementRegistry-whenDefined">whenDefined</code>(<var>name</var>)</dt>
6641566415

6641666416
<dd>Returns a promise that will be fulfilled when a <span>custom element</span> becomes defined
6641766417
with the given name. (If such a <span>custom element</span> is already defined, the returned
@@ -66421,9 +66421,9 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
6642166421
</dl>
6642266422

6642366423
<p><dfn>Element definition</dfn> is a process of adding a <span>custom element definition</span>
66424-
to the <code>CustomElementsRegistry</code>. This is accomplished by the <code
66425-
data-x="dom-CustomElementsRegistry-define">define()</code> method. When invoked, the <dfn><code
66426-
data-x="dom-CustomElementsRegistry-define">define(<var>name</var>, <var>constructor</var>,
66424+
to the <code>CustomElementRegistry</code>. This is accomplished by the <code
66425+
data-x="dom-CustomElementRegistry-define">define()</code> method. When invoked, the <dfn><code
66426+
data-x="dom-CustomElementRegistry-define">define(<var>name</var>, <var>constructor</var>,
6642766427
<var>options</var>)</code></dfn> method must run these steps:</p>
6642866428

6642966429
<ol>
@@ -66433,12 +66433,12 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
6643366433
<li><p>If <var>name</var> is not a <span>valid custom element name</span>, then throw a
6643466434
<span>"<code>SyntaxError</code>"</span> <code>DOMException</code> and abort these steps.</p></li>
6643566435

66436-
<li><p>If this <code>CustomElementsRegistry</code> contains an entry with <span
66436+
<li><p>If this <code>CustomElementRegistry</code> contains an entry with <span
6643766437
data-x="concept-custom-element-definition-name">name</span> <var>name</var>, then throw a
6643866438
<span>"<code>NotSupportedError</code>"</span> <code>DOMException</code> and abort these
6643966439
steps.</p></li>
6644066440

66441-
<li><p>If this <code>CustomElementsRegistry</code> contains an entry with <span
66441+
<li><p>If this <code>CustomElementRegistry</code> contains an entry with <span
6644266442
data-x="concept-custom-element-definition-constructor">constructor</span> <var>constructor</var>,
6644366443
then throw a <span>"<code>NotSupportedError</code>"</span> <code>DOMException</code> and abort
6644466444
these steps.</p></li>
@@ -66464,11 +66464,11 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
6646466464
</ol>
6646566465
</li>
6646666466

66467-
<li><p>If this <code>CustomElementsRegistry</code>'s <span>element definition is running</span>
66467+
<li><p>If this <code>CustomElementRegistry</code>'s <span>element definition is running</span>
6646866468
flag is set, then throw a <span>"<code>NotSupportedError</code>"</span> <code>DOMException</code>
6646966469
and abort these steps.</p></li>
6647066470

66471-
<li><p>Set this <code>CustomElementsRegistry</code>'s <span>element definition is running</span>
66471+
<li><p>Set this <code>CustomElementRegistry</code>'s <span>element definition is running</span>
6647266472
flag.</p></li>
6647366473

6647466474
<li>
@@ -66526,7 +66526,7 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
6652666526
or not:</p>
6652766527

6652866528
<ol>
66529-
<li><p>Unset this <code>CustomElementsRegistry</code>'s <span>element definition is
66529+
<li><p>Unset this <code>CustomElementRegistry</code>'s <span>element definition is
6653066530
running</span> flag.</p></li>
6653166531
</ol>
6653266532

@@ -66545,9 +66545,9 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
6654566545
data-x="concept-custom-element-definition-lifecycle-callbacks">lifecycle callbacks</span>
6654666546
<var>lifecycleCallbacks</var>.</p></li>
6654766547

66548-
<li><p>Add <var>definition</var> to this <code>CustomElementsRegistry</code>.</p></li>
66548+
<li><p>Add <var>definition</var> to this <code>CustomElementRegistry</code>.</p></li>
6654966549

66550-
<li><p>Let <var>document</var> be this <code>CustomElementsRegistry</code>'s <span
66550+
<li><p>Let <var>document</var> be this <code>CustomElementRegistry</code>'s <span
6655166551
data-x="concept-relevant-global">relevant global object</span>'s <span
6655266552
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>
6655366553

@@ -66566,7 +66566,7 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
6656666566
upgrade" bail out, but this seems a bit more explicit. -->
6656766567

6656866568
<li>
66569-
<p>If this <code>CustomElementsRegistry</code>'s <span>when-defined promise map</span>
66569+
<p>If this <code>CustomElementRegistry</code>'s <span>when-defined promise map</span>
6657066570
contains an entry with key <var>name</var>:</p>
6657166571

6657266572
<ol>
@@ -66575,37 +66575,37 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
6657566575
<li><p>Resolve <var>promise</var> with undefined.</p></li>
6657666576

6657766577
<li><p>Delete the entry with key <var>name</var> from this
66578-
<code>CustomElementsRegistry</code>'s <span>when-defined promise map</span>.</p></li>
66578+
<code>CustomElementRegistry</code>'s <span>when-defined promise map</span>.</p></li>
6657966579
</ol>
6658066580
</li>
6658166581
</ol>
6658266582

6658366583
<p>When invoked, the <dfn><code
66584-
data-x="dom-CustomElementsRegistry-get">get(<var>name</var>)</code></dfn> method must run these
66584+
data-x="dom-CustomElementRegistry-get">get(<var>name</var>)</code></dfn> method must run these
6658566585
steps:</p>
6658666586

6658766587
<ol>
66588-
<li><p>If this <code>CustomElementsRegistry</code> contains an entry with <span
66588+
<li><p>If this <code>CustomElementRegistry</code> contains an entry with <span
6658966589
data-x="concept-custom-element-definition-name">name</span> <var>name</var>, then return that
6659066590
entry's <span data-x="concept-custom-element-definition-constructor">constructor</span>.</p></li>
6659166591

6659266592
<li><p>Otherwise, return undefined.</p></li>
6659366593
</ol>
6659466594

6659566595
<p>When invoked, the <dfn><code
66596-
data-x="dom-CustomElementsRegistry-whenDefined">whenDefined(<var>name</var>)</code></dfn> method
66596+
data-x="dom-CustomElementRegistry-whenDefined">whenDefined(<var>name</var>)</code></dfn> method
6659766597
must run these steps:</p>
6659866598

6659966599
<ol>
6660066600
<li><p>If <var>name</var> is not a <span>valid custom element name</span>, then return a new
6660166601
promise rejected with a <span>"<code>SyntaxError</code>"</span> <code>DOMException</code> and
6660266602
abort these steps.</p></li>
6660366603

66604-
<li><p>If this <code>CustomElementsRegistry</code> contains an entry with <span
66604+
<li><p>If this <code>CustomElementRegistry</code> contains an entry with <span
6660566605
data-x="concept-custom-element-definition-name">name</span> <var>name</var>, then return a new
6660666606
promise resolved with undefined and abort these steps.</p></li>
6660766607

66608-
<li><p>Let <var>map</var> be this <code>CustomElementsRegistry</code>'s <span>when-defined
66608+
<li><p>Let <var>map</var> be this <code>CustomElementRegistry</code>'s <span>when-defined
6660966609
promise map</span>.</p></li>
6661066610

6661166611
<li><p>If <var>map</var> does not contain an entry with key <var>name</var>, create an entry in
@@ -66618,7 +66618,7 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
6661866618
</ol>
6661966619

6662066620
<div class="example">
66621-
<p>The <code data-x="dom-CustomElementsRegistry-whenDefined">whenDefined()</code> method can be
66621+
<p>The <code data-x="dom-CustomElementRegistry-whenDefined">whenDefined()</code> method can be
6662266622
used to avoid performing an action until all appropriate <span data-x="custom element">custom
6662366623
elements</span> are <span data-x="concept-element-defined">defined</span>. In this example, we
6662466624
combine it with the <code data-x="selector-defined">:defined</code> pseudo-class to hide a
@@ -78401,7 +78401,7 @@ console.assert(iframeWindow.frameElement === null);
7840178401
attribute DOMString <span data-x="dom-name">name</span>; <!-- not [Replaceable] per WebKit and IE8 -->
7840278402
[PutForwards=<span data-x="dom-location-href">href</span>, Unforgeable] readonly attribute <span>Location</span> <span data-x="dom-location">location</span>;
7840378403
readonly attribute <span>History</span> <span data-x="dom-history">history</span>;
78404-
readonly attribute <span>CustomElementsRegistry</span> <span data-x="dom-window-customElements">customElements</span>;
78404+
readonly attribute <span>CustomElementRegistry</span> <span data-x="dom-window-customElements">customElements</span>;
7840578405
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-locationbar">locationbar</span>;
7840678406
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-menubar">menubar</span>;
7840778407
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-personalbar">personalbar</span>;

0 commit comments

Comments
 (0)