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