@@ -1729,7 +1729,7 @@ can only be used to influence an ongoing one.
1729
1729
1730
1730
1731
1731
1732
- <h2 id=aborting-ongoing-activities>Aborting ongoing activities</h3 >
1732
+ <h2 id=aborting-ongoing-activities>Aborting ongoing activities</h2 >
1733
1733
1734
1734
<p> Though promises do not have a built-in aborting mechanism, many APIs using them require abort
1735
1735
semantics. {{AbortController}} is meant to support these requirements by providing an
@@ -2461,20 +2461,20 @@ reference to the <a>slot</a>, because this variable is not directly accessible f
2461
2461
2462
2462
<h5 id=finding-slots-and-slotables>Finding slots and slottables</h5>
2463
2463
2464
- <p> To <dfn export lt="find a slot|finding a slot">find a slot</dfn> for a given <a>slottable</a >
2465
- <var> slottable </var> and an optional <i> open flag </i> (unset unless stated otherwise), run these
2466
- steps: </p>
2464
+ <div algorithm >
2465
+ <p> To <dfn>find a slot</dfn> for a given <a for=/>slottable</a> <var> slottable </var> and an optional
2466
+ boolean <var> open </var> (default false):
2467
2467
2468
2468
<ol>
2469
- <li><p> If <var> slottable</var> 's <a for=tree>parent</a> is null, then return null.</p></li>
2469
+ <li><p> If <var> slottable</var> 's <a for=tree>parent</a> is null, then return null.
2470
2470
2471
2471
<li><p> Let <var> shadow</var> be <var> slottable</var> 's <a for=tree>parent</a>' s
2472
- <a for=Element>shadow root</a> .</p></li>
2472
+ <a for=Element>shadow root</a> .
2473
2473
2474
- <li><p> If <var> shadow</var> is null, then return null.</p></li>
2474
+ <li><p> If <var> shadow</var> is null, then return null.
2475
2475
2476
- <li><p> If the <i > open flag </i > is set and <var> shadow</var> 's <a for=ShadowRoot>mode</a> is
2477
- <em> not </em> "<code> open</code> ", then return null.</p></li>
2476
+ <li><p> If <var > open</var > is true and <var> shadow</var> 's <a for=ShadowRoot>mode</a> is not
2477
+ "<code> open</code> ", then return null.
2478
2478
2479
2479
<li><p> If <var> shadow</var> 's <a for=ShadowRoot>slot assignment</a> is "<code> manual</code> ", then
2480
2480
return the <a>slot</a> in <var> shadow</var> 's <a for=tree>descendants</a> whose
@@ -2485,12 +2485,14 @@ steps:</p>
2485
2485
<a for=tree>descendants</a> whose <a for=slot>name</a> is <var> slottable</var> 's
2486
2486
<a for=slottable>name</a> , if any; otherwise null.
2487
2487
</ol>
2488
+ </div>
2488
2489
2489
- <p> To <dfn export lt="find slottables|finding slottables" id=find-slotables>find slottables</dfn>
2490
- for a given <a>slot</a> <var> slot</var> , run these steps:</p>
2490
+ <div algorithm>
2491
+ <p> To <dfn export id=find-slotables>find slottables</dfn> for a given <a for=/>slot</a>
2492
+ <var> slot</var> :
2491
2493
2492
2494
<ol>
2493
- <li><p> Let <var> result</var> be an empty list. </p></li>
2495
+ <li><p> Let <var> result</var> be « ».
2494
2496
2495
2497
<li><p> Let <var> root</var> be <var> slot</var> 's <a for=tree>root</a> .
2496
2498
@@ -2502,8 +2504,6 @@ for a given <a>slot</a> <var>slot</var>, run these steps:</p>
2502
2504
<p> If <var> root</var> 's <a for=ShadowRoot>slot assignment</a> is "<code> manual</code> ":
2503
2505
2504
2506
<ol>
2505
- <li><p> Let <var> result</var> be « ».
2506
-
2507
2507
<li><p> <a for=set>For each</a> <a>slottable</a> <var> slottable</var> of <var> slot</var> 's
2508
2508
<a>manually assigned nodes</a> , if <var> slottable</var> 's <a for=tree>parent</a> is
2509
2509
<var> host</var> , <a for=list>append</a> <var> slottable</var> to <var> result</var> .
@@ -2520,53 +2520,53 @@ for a given <a>slot</a> <var>slot</var>, run these steps:</p>
2520
2520
<li><p> If <var> foundSlot</var> is <var> slot</var> , then <a for=list>append</a>
2521
2521
<var> slottable</var> to <var> result</var> .
2522
2522
</ol>
2523
- </li>
2524
2523
2525
- <li><p> Return <var> result</var> .</p></li>
2524
+ <li><p> Return <var> result</var> .
2526
2525
</ol>
2526
+ </div>
2527
2527
2528
- <p> To
2529
- <dfn export lt="find flattened slottables|finding flattened slottables" id=find-flattened-slotables>find flattened slottables</dfn>
2530
- for a given <a >slot</a> <var> slot</var> , run these steps: </p>
2528
+ <div algorithm>
2529
+ <p> To < dfn export id=find-flattened-slotables>find flattened slottables</dfn> for a given
2530
+ <a for=/ >slot</a> <var> slot</var> :
2531
2531
2532
2532
<ol>
2533
- <li><p> Let <var> result</var> be an empty list. </p></li>
2533
+ <li><p> Let <var> result</var> be « ».
2534
2534
2535
2535
<li><p> If <var> slot</var> 's <a for=tree>root</a> is not a <a for=/>shadow root</a> , then return
2536
- <var> result</var> .</p></li>
2536
+ <var> result</var> .
2537
2537
2538
2538
<li><p> Let <var> slottables</var> be the result of <a>finding slottables</a> given
2539
- <var> slot</var> .</p></li>
2539
+ <var> slot</var> .
2540
2540
2541
2541
<li><p> If <var> slottables</var> is the empty list, then append each <a>slottable</a>
2542
- <a for=tree>child</a> of <var> slot</var> , in <a>tree order</a> , to <var> slottables</var> .</p></li>
2542
+ <a for=tree>child</a> of <var> slot</var> , in <a>tree order</a> , to <var> slottables</var> .
2543
2543
2544
2544
<li>
2545
- <p> For each <var> node</var> in <var> slottables</var> :
2545
+ <p> For each <var> node</var> of <var> slottables</var> :
2546
2546
2547
2547
<ol>
2548
2548
<li>
2549
2549
<p> If <var> node</var> is a <a>slot</a> whose <a for=tree>root</a> is a <a for=/>shadow root</a> :
2550
2550
2551
2551
<ol>
2552
2552
<li><p> Let <var> temporaryResult</var> be the result of <a>finding flattened slottables</a> given
2553
- <var> node</var> .</p></li>
2553
+ <var> node</var> .
2554
2554
2555
2555
<li><p> Append each <a>slottable</a> in <var> temporaryResult</var> , in order, to
2556
- <var> result</var> .</p></li>
2556
+ <var> result</var> .
2557
2557
</ol>
2558
2558
2559
- <li><p> Otherwise, append <var> node</var> to <var> result</var> .</p></li>
2559
+ <li><p> Otherwise, append <var> node</var> to <var> result</var> .
2560
2560
</ol>
2561
- </li>
2562
2561
2563
- <li><p> Return <var> result</var> .</p></li>
2562
+ <li><p> Return <var> result</var> .
2564
2563
</ol>
2564
+ </div>
2565
2565
2566
2566
<h5 id=assigning-slotables-and-slots>Assigning slottables and slots</h5>
2567
2567
2568
- <p> To <dfn noexport id=assign-slotables>assign slottables</dfn> for a <a>slot</a> <var> slot </var> ,
2569
- run these steps :
2568
+ <div algorithm>
2569
+ <p> To <dfn id=assign-slotables>assign slottables</dfn> for a <a for=/>slot</a> <var> slot </var> :
2570
2570
2571
2571
<ol>
2572
2572
<li><p> Let <var> slottables</var> be the result of <a>finding slottables</a> for <var> slot</var> .
@@ -2576,36 +2576,42 @@ run these steps:
2576
2576
2577
2577
<li><p> Set <var> slot</var> 's <a for=slot>assigned nodes</a> to <var> slottables</var> .
2578
2578
2579
- <li><p> For each <var> slottable</var> in <var> slottables</var> , set <var> slottable</var> 's
2579
+ <li><p> For each <var> slottable</var> of <var> slottables</var> , set <var> slottable</var> 's
2580
2580
<a>assigned slot</a> to <var> slot</var> .
2581
2581
</ol>
2582
+ </div>
2582
2583
2583
- <p> To <dfn noexport id=assign-slotables-for-a-tree>assign slottables for a tree</dfn> , given a
2584
- <a for=/>node</a> <var> root</var> , run <a>assign slottables</a> for each <a>slot</a> <var> slot</var>
2585
- in <var> root</var> 's <a for=tree>inclusive descendants</a> , in <a>tree order</a> .
2584
+ <div algorithm>
2585
+ <p> To <dfn id=assign-slotables-for-a-tree>assign slottables for a tree</dfn> , given a
2586
+ <a for=/>node</a> <var> root</var> , run <a>assign slottables</a> for each <a for=/>slot</a> of
2587
+ <var> root</var> 's <a for=tree>inclusive descendants</a> , in <a>tree order</a> .
2588
+ </div>
2586
2589
2587
- <p> To <dfn noexport>assign a slot</dfn> , given a <a>slottable</a> <var> slottable </var> , run these
2588
- steps :
2590
+ <div algorithm>
2591
+ <p> To <dfn>assign a slot</dfn> , given a <a>slottable</a> <var> slottable </var> :
2589
2592
2590
2593
<ol>
2591
2594
<li><p> Let <var> slot</var> be the result of <a>finding a slot</a> with <var> slottable</var> .
2592
2595
2593
2596
<li><p> If <var> slot</var> is non-null, then run <a>assign slottables</a> for <var> slot</var> .
2594
2597
</ol>
2598
+ </div>
2595
2599
2596
2600
<h5 id=signaling-slot-change>Signaling slot change</h5>
2597
2601
2598
2602
<p> Each <a>similar-origin window agent</a> has <dfn noexport id=signal-slot-list>signal slots</dfn>
2599
2603
(a <a for=/>set</a> of <a>slots</a> ), which is initially empty. [[!HTML]]
2600
2604
2601
- <p> To <dfn noexport>signal a slot change</dfn> , for a <a>slot</a> <var> slot</var> , run these steps:
2605
+ <div algorithm>
2606
+ <p> To <dfn>signal a slot change</dfn> , for a <a>slot</a> <var> slot</var> :
2602
2607
2603
2608
<ol>
2604
2609
<li><p> <a for=set>Append</a> <var> slot</var> to <var> slot</var> 's <a>relevant agent</a>' s
2605
2610
<a>signal slots</a> .
2606
2611
2607
2612
<li><p> <a>Queue a mutation observer microtask</a> .
2608
2613
</ol>
2614
+ </div>
2609
2615
2610
2616
2611
2617
<h4 id=mutation-algorithms>Mutation algorithms</h4>
@@ -3446,8 +3452,7 @@ Text includes Slottable;
3446
3452
</pre>
3447
3453
3448
3454
<p> The <dfn attribute for=Slottable id=dom-slotable-assignedslot><code>assignedSlot</code></dfn>
3449
- getter steps are to return the result of <a>find a slot</a> given <a>this</a> and with the
3450
- <i> open flag</i> set.
3455
+ getter steps are to return the result of <a>find a slot</a> given <a>this</a> and true.
3451
3456
3452
3457
3453
3458
<h4 id=old-style-collections>Old-style collections: {{NodeList}} and {{HTMLCollection}}</h4>
@@ -5291,7 +5296,7 @@ otherwise "<code>CSS1Compat</code>".
5291
5296
<dt><var> document</var> . {{Document/documentElement}}
5292
5297
<dd> Returns the <a>document element</a> .
5293
5298
5294
- <dt><var> collection</var> = <var> document</var> . {{ Document/ getElementsByTagName(qualifiedName)}} </code>
5299
+ <dt><code>< var> collection</var> = <var> document</var> . <a method for= Document lt=" getElementsByTagName(qualifiedName)">getElementsByTagName</a> ( <var> qualifiedName </var> ) </code>
5295
5300
5296
5301
<dd>
5297
5302
<p> If <var> qualifiedName</var> is "<code> *</code> " returns an {{HTMLCollection}} of all
@@ -5302,7 +5307,7 @@ otherwise "<code>CSS1Compat</code>".
5302
5307
(Matches case-insensitively against <a for=/>elements</a> in the <a>HTML namespace</a> within an
5303
5308
<a>HTML document</a> .)
5304
5309
5305
- <dt><var> collection</var> = <var> document</var> . {{ Document/ getElementsByTagNameNS(namespace, localName)}} </code>
5310
+ <dt><code>< var> collection</var> = <var> document</var> . <a method for= Document lt=" getElementsByTagNameNS(namespace, localName)">getElementsByTagNameNS</a> ( <var> namespace </var> , <var> localName </var> ) </code>
5306
5311
5307
5312
<dd>
5308
5313
<p> If <var> namespace</var> and <var> localName</var> are "<code> *</code> ", returns an
@@ -5320,8 +5325,8 @@ otherwise "<code>CSS1Compat</code>".
5320
5325
<a for=/>elements</a> whose <a for=Element>namespace</a> is <var> namespace</var> and
5321
5326
<a for=Element>local name</a> is <var> localName</var> .
5322
5327
5323
- <dt><var> collection</var> = <var> document</var> . {{ Document/ getElementsByClassName(classNames)}} </code>
5324
- <dt><var> collection</var> = <var> element</var> . {{ Element/ getElementsByClassName(classNames)}} </code>
5328
+ <dt><code>< var> collection</var> = <var> document</var> . <a method for= Document lt=" getElementsByClassName(classNames)">getElementsByClassName</a> ( <var> classNames </var> ) </code>
5329
+ <dt><code>< var> collection</var> = <var> element</var> . <a method for= Element lt=" getElementsByClassName(classNames)">getElementsByClassName</a> ( <var> classNames </var> ) </code>
5325
5330
<dd><p> Returns an {{HTMLCollection}} of the <a for=/>elements</a> in the object on which the method
5326
5331
was invoked (a <a for=/>document</a> or an <a for=/>element</a> ) that have all the classes given by
5327
5332
<var> classNames</var> . The <var> classNames</var> argument is interpreted as a space-separated list
0 commit comments