@@ -9754,7 +9754,7 @@ interface <dfn>HTMLUnknownElement</dfn> : <span>HTMLElement</span> { };</pre>
9754
9754
9755
9755
<ol>
9756
9756
<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>
9758
9758
9759
9759
<li>
9760
9760
<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"<
66327
66327
66328
66328
<li><p>Let <var>registry</var> be <var>document</var>'s <span
66329
66329
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>
66331
66331
66332
66332
<li><p>If there is <span>custom element definition</span> in <var>registry</var> with <span
66333
66333
data-x="concept-custom-element-definition-name">name</span> and <span
@@ -66342,10 +66342,10 @@ console.log(plasticButton2.getAttribute("is")); // will output "plastic-button"<
66342
66342
<li><p>Return null.</p></li>
66343
66343
</ol>
66344
66344
66345
- <h4 id="custom-elements-api">The <code>CustomElementsRegistry </code> interface</h4>
66345
+ <h4 id="custom-elements-api">The <code>CustomElementRegistry </code> interface</h4>
66346
66346
66347
66347
<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
66349
66349
created.</p>
66350
66350
66351
66351
<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"<
66354
66354
interface per <code>Window</code> object.</p>
66355
66355
66356
66356
<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
66358
66358
<code>Window</code> object.</p>
66359
66359
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<void> <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<void> <span data-x="dom-CustomElementRegistry -whenDefined">whenDefined</span>(DOMString name);
66364
66364
};
66365
66365
66366
66366
dictionary <dfn>ElementDefinitionOptions</dfn> {
66367
66367
DOMString extends;
66368
66368
};</pre>
66369
66369
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
66371
66371
definition">custom element definitions</span>, initially empty. In general, algorithms in this
66372
66372
specification look up elements in the registry by any of <span
66373
66373
data-x="concept-custom-element-definition-name">name</span>, <span
66374
66374
data-x="concept-custom-element-definition-local-name">local name</span>, or <span
66375
66375
data-x="concept-custom-element-definition-constructor">constructor</span>.</p>
66376
66376
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>
66378
66378
flag which is used to prevent reentrant invocations of <span>element definition</span>. It is
66379
66379
initially unset.</p>
66380
66380
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>,
66382
66382
mapping <span data-x="valid custom element name">valid custom element names</span> to promises. It
66383
66383
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>
66385
66385
66386
66386
<dl class="domintro">
66387
66387
<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>,
66389
66389
<var>constructor</var>)</dt>
66390
66390
66391
66391
<dd>Defines a new <span>custom element</span>, mapping the given name to the given constructor as
66392
66392
an <span>autonomous custom element</span>.</dd>
66393
66393
66394
66394
66395
66395
<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>,
66397
66397
{ extends: <var>baseLocalName</var> })</dt>
66398
66398
66399
66399
<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> {
66403
66403
an unknown element.</dd>
66404
66404
66405
66405
<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>
66407
66407
66408
66408
<dd>Retrieves the <span>custom element constructor</span> defined for the given <span
66409
66409
data-x="concept-custom-element-definition-name">name</span>. Returns undefined if there is no
66410
66410
<span>custom element definition</span> with the given <span
66411
66411
data-x="concept-custom-element-definition-name">name</span>.</dd>
66412
66412
66413
66413
<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>
66415
66415
66416
66416
<dd>Returns a promise that will be fulfilled when a <span>custom element</span> becomes defined
66417
66417
with the given name. (If such a <span>custom element</span> is already defined, the returned
@@ -66421,9 +66421,9 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
66421
66421
</dl>
66422
66422
66423
66423
<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>,
66427
66427
<var>options</var>)</code></dfn> method must run these steps:</p>
66428
66428
66429
66429
<ol>
@@ -66433,12 +66433,12 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
66433
66433
<li><p>If <var>name</var> is not a <span>valid custom element name</span>, then throw a
66434
66434
<span>"<code>SyntaxError</code>"</span> <code>DOMException</code> and abort these steps.</p></li>
66435
66435
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
66437
66437
data-x="concept-custom-element-definition-name">name</span> <var>name</var>, then throw a
66438
66438
<span>"<code>NotSupportedError</code>"</span> <code>DOMException</code> and abort these
66439
66439
steps.</p></li>
66440
66440
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
66442
66442
data-x="concept-custom-element-definition-constructor">constructor</span> <var>constructor</var>,
66443
66443
then throw a <span>"<code>NotSupportedError</code>"</span> <code>DOMException</code> and abort
66444
66444
these steps.</p></li>
@@ -66464,11 +66464,11 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
66464
66464
</ol>
66465
66465
</li>
66466
66466
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>
66468
66468
flag is set, then throw a <span>"<code>NotSupportedError</code>"</span> <code>DOMException</code>
66469
66469
and abort these steps.</p></li>
66470
66470
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>
66472
66472
flag.</p></li>
66473
66473
66474
66474
<li>
@@ -66526,7 +66526,7 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
66526
66526
or not:</p>
66527
66527
66528
66528
<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
66530
66530
running</span> flag.</p></li>
66531
66531
</ol>
66532
66532
@@ -66545,9 +66545,9 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
66545
66545
data-x="concept-custom-element-definition-lifecycle-callbacks">lifecycle callbacks</span>
66546
66546
<var>lifecycleCallbacks</var>.</p></li>
66547
66547
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>
66549
66549
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
66551
66551
data-x="concept-relevant-global">relevant global object</span>'s <span
66552
66552
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>
66553
66553
@@ -66566,7 +66566,7 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
66566
66566
upgrade" bail out, but this seems a bit more explicit. -->
66567
66567
66568
66568
<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>
66570
66570
contains an entry with key <var>name</var>:</p>
66571
66571
66572
66572
<ol>
@@ -66575,37 +66575,37 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
66575
66575
<li><p>Resolve <var>promise</var> with undefined.</p></li>
66576
66576
66577
66577
<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>
66579
66579
</ol>
66580
66580
</li>
66581
66581
</ol>
66582
66582
66583
66583
<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
66585
66585
steps:</p>
66586
66586
66587
66587
<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
66589
66589
data-x="concept-custom-element-definition-name">name</span> <var>name</var>, then return that
66590
66590
entry's <span data-x="concept-custom-element-definition-constructor">constructor</span>.</p></li>
66591
66591
66592
66592
<li><p>Otherwise, return undefined.</p></li>
66593
66593
</ol>
66594
66594
66595
66595
<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
66597
66597
must run these steps:</p>
66598
66598
66599
66599
<ol>
66600
66600
<li><p>If <var>name</var> is not a <span>valid custom element name</span>, then return a new
66601
66601
promise rejected with a <span>"<code>SyntaxError</code>"</span> <code>DOMException</code> and
66602
66602
abort these steps.</p></li>
66603
66603
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
66605
66605
data-x="concept-custom-element-definition-name">name</span> <var>name</var>, then return a new
66606
66606
promise resolved with undefined and abort these steps.</p></li>
66607
66607
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
66609
66609
promise map</span>.</p></li>
66610
66610
66611
66611
<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> {
66618
66618
</ol>
66619
66619
66620
66620
<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
66622
66622
used to avoid performing an action until all appropriate <span data-x="custom element">custom
66623
66623
elements</span> are <span data-x="concept-element-defined">defined</span>. In this example, we
66624
66624
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);
78401
78401
attribute DOMString <span data-x="dom-name">name</span>; <!-- not [Replaceable] per WebKit and IE8 -->
78402
78402
[PutForwards=<span data-x="dom-location-href">href</span>, Unforgeable] readonly attribute <span>Location</span> <span data-x="dom-location">location</span>;
78403
78403
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>;
78405
78405
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-locationbar">locationbar</span>;
78406
78406
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-menubar">menubar</span>;
78407
78407
[Replaceable] readonly attribute <span>BarProp</span> <span data-x="dom-window-personalbar">personalbar</span>;
0 commit comments