@@ -65996,8 +65996,8 @@ console.log(plasticButton.outerHTML); // will output '<button is="plastic-but
65996
65996
65997
65997
<p>After a <span>custom element</span> is <span data-x="create an element">created</span>,
65998
65998
changing the value of the <code data-x="attr-is">is</code> attribute does not
65999
- change the element's behavior, as it is saved on the element as its <span
66000
- data-x="concept-element-is-value"><code data-x="">is</code> value</span>.</p>
65999
+ change the element's behavior<span w-nodev> , as it is saved on the element as its <span
66000
+ data-x="concept-element-is-value"><code data-x="">is</code> value</span></span> .</p>
66001
66001
66002
66002
<p><span data-x="autonomous custom element">Autonomous custom elements</span> have the following
66003
66003
element definition:</p>
@@ -66107,6 +66107,8 @@ console.log(plasticButton.outerHTML); // will output '<button is="plastic-but
66107
66107
data-x=""><emotion-😍></code>.</p>
66108
66108
</div>
66109
66109
66110
+ <div w-nodev>
66111
+
66110
66112
<p>A <dfn>custom element definition</dfn> describes a <span>custom element</span> and consists
66111
66113
of:</p>
66112
66114
@@ -66172,9 +66174,11 @@ console.log(plasticButton.outerHTML); // will output '<button is="plastic-but
66172
66174
<li><p>Return null.</p></li>
66173
66175
</ol>
66174
66176
66177
+ </div>
66178
+
66175
66179
<h4 id="custom-elements-api">The <code>CustomElementRegistry</code> interface</h4>
66176
66180
66177
- <p>Each <code>Window</code> object is associated with a unique instance of a
66181
+ <p w-nodev >Each <code>Window</code> object is associated with a unique instance of a
66178
66182
<code>CustomElementRegistry</code> object, allocated when the <code>Window</code> object is
66179
66183
created.</p>
66180
66184
@@ -66183,9 +66187,11 @@ console.log(plasticButton.outerHTML); // will output '<button is="plastic-but
66183
66187
the <code>HTMLElement</code> interface, and there is exactly one <code>HTMLElement</code>
66184
66188
interface per <code>Window</code> object.</p>
66185
66189
66186
- <p>The <dfn><code data-x="dom-window-customElements">customElements</code></dfn> attribute of the
66187
- <code>Window</code> interface must return the <code>CustomElementRegistry</code> object for that
66188
- <code>Window</code> object.</p>
66190
+ <div w-nodev>
66191
+
66192
+ <p>The <dfn><code data-x="dom-window-customElements">customElements</code></dfn> attribute
66193
+ of the <code>Window</code> interface must return the <code>CustomElementRegistry</code> object for
66194
+ that <code>Window</code> object.</p>
66189
66195
66190
66196
<pre class="idl">[Exposed=Window]
66191
66197
interface <dfn>CustomElementRegistry</dfn> {
@@ -66215,6 +66221,8 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
66215
66221
is used to implement the <code
66216
66222
data-x="dom-CustomElementRegistry-whenDefined">whenDefined()</code> method.</p>
66217
66223
66224
+ </div>
66225
+
66218
66226
<dl class="domintro">
66219
66227
<dt><var>window</var> . <code data-x="dom-window-customElements">customElements</code> . <code
66220
66228
subdfn data-x="dom-CustomElementRegistry-define">define</code>(<var>name</var>,
@@ -66261,9 +66269,11 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
66261
66269
66262
66270
<p><dfn>Element definition</dfn> is a process of adding a <span>custom element definition</span>
66263
66271
to the <code>CustomElementRegistry</code>. This is accomplished by the <code
66264
- data-x="dom-CustomElementRegistry-define">define()</code> method. When invoked, the <dfn><code
66265
- data-x="dom-CustomElementRegistry-define">define(<var>name</var>, <var>constructor</var>,
66266
- <var>options</var>)</code></dfn> method must run these steps:</p>
66272
+ data-x="dom-CustomElementRegistry-define">define()</code> method. <span w-nodev>When invoked,
66273
+ the <dfn><code data-x="dom-CustomElementRegistry-define">define(<var>name</var>,
66274
+ <var>constructor</var>, <var>options</var>)</code></dfn> method must run these steps:</span></p>
66275
+
66276
+ <div w-nodev>
66267
66277
66268
66278
<ol>
66269
66279
<li><p>If <span>IsConstructor</span>(<var>constructor</var>) is false, then throw a
@@ -66451,6 +66461,8 @@ dictionary <dfn>ElementDefinitionOptions</dfn> {
66451
66461
<li><p>Return <var>promise</var>.</p></li>
66452
66462
</ol>
66453
66463
66464
+ </div>
66465
+
66454
66466
<div class="example">
66455
66467
<p>The <code data-x="dom-CustomElementRegistry-whenDefined">whenDefined()</code> method can be
66456
66468
used to avoid performing an action until all appropriate <span data-x="custom element">custom
@@ -66476,6 +66488,8 @@ fetch(articleURL)
66476
66488
});</pre>
66477
66489
</div>
66478
66490
66491
+ <div w-nodev>
66492
+
66479
66493
<p>When invoked, the <dfn><code
66480
66494
data-x="dom-CustomElementRegistry-upgrade">upgrade(<var>root</var>)</code></dfn> method must run
66481
66495
these steps:</p>
@@ -66488,6 +66502,8 @@ fetch(articleURL)
66488
66502
<span data-x="concept-try-upgrade">try to upgrade</span> <var>candidate</var>.</p></li>
66489
66503
</ol>
66490
66504
66505
+ </div>
66506
+
66491
66507
<div class="example">
66492
66508
<p>The <code data-x="dom-CustomElementRegistry-upgrade">upgrade()</code> method allows upgrading
66493
66509
of elements at will. Normally elements are automatically upgraded when they become
@@ -66505,6 +66521,8 @@ customElements.upgrade(el);
66505
66521
console.assert(el instanceof SpiderMan); // upgraded!</pre>
66506
66522
</div>
66507
66523
66524
+ <div w-nodev>
66525
+
66508
66526
<h4><dfn data-x="custom-element-upgrades">Upgrades</dfn></h4>
66509
66527
66510
66528
<p>To <dfn data-x="concept-upgrade-an-element" data-export="">upgrade an element</dfn>, given as
@@ -66654,6 +66672,8 @@ customElements.define("x-foo", class extends HTMLElement {
66654
66672
reaction</span> given <var>element</var> and <var>definition</var>.</p></li>
66655
66673
</ol>
66656
66674
66675
+ </div>
66676
+
66657
66677
<h4 id="custom-element-reactions">Custom element reactions</h4>
66658
66678
66659
66679
<p>A <span>custom element</span> possesses the ability to respond to certain occurrences by
@@ -66694,13 +66714,16 @@ customElements.define("x-foo", class extends HTMLElement {
66694
66714
data-x="concept-range">range</span> manipulation), they will instead be delayed until after all
66695
66715
the relevant user agent processing steps have completed, and then run together as a batch.</p>
66696
66716
66697
- <p>Additionally, the precise ordering of these reactions is managed via a somewhat-complicated
66698
- stack-of-queues system, described below. The intention behind this system is to guarantee that
66699
- <span data-x="concept-custom-element-reaction">custom element reactions</span> always are invoked
66700
- in the same order as their triggering actions, at least within the local context of a single
66701
- <span>custom element</span>. (Because <span data-x="concept-custom-element-reaction">custom
66702
- element reaction</span> code can perform its own mutations, it is not possible to give a global
66703
- ordering guarantee across multiple elements.)</p>
66717
+ <p><span w-nodev>Additionally, the precise ordering of these reactions is managed via a
66718
+ somewhat-complicated stack-of-queues system, described below. The intention behind this system is
66719
+ to guarantee</span><span w-nohtml>It is guaranteed</span> that <span
66720
+ data-x="concept-custom-element-reaction">custom element reactions</span> always are invoked in the
66721
+ same order as their triggering actions, at least within the local context of a single <span>custom
66722
+ element</span>. (Because <span data-x="concept-custom-element-reaction">custom element
66723
+ reaction</span> code can perform its own mutations, it is not possible to give a global ordering
66724
+ guarantee across multiple elements.)</p>
66725
+
66726
+ <div w-nodev>
66704
66727
66705
66728
<hr>
66706
66729
@@ -66928,6 +66951,8 @@ customElements.define("x-foo", class extends HTMLElement {
66928
66951
</ul>
66929
66952
</div>
66930
66953
66954
+ </div>
66955
+
66931
66956
66932
66957
<h3 split-filename="semantics-other" id="common-idioms">Common idioms without dedicated elements</h3>
66933
66958
0 commit comments