@@ -160,11 +160,9 @@ clipped corners.
160
160
<p> A <dfn>non-persistent notification</dfn> is a <a>notification</a> whose
161
161
<a for=notification>service worker registration</a> is null.
162
162
163
- <p> A <dfn>persistent notification</dfn> is a <a>notification</a> whose
163
+ <p tracking-vector > A <dfn>persistent notification</dfn> is a <a>notification</a> whose
164
164
<a for=notification>service worker registration</a> is non-null.
165
165
166
- <!-- XXX https://html.spec.whatwg.org/#fingerprinting-vector -->
167
-
168
166
<hr>
169
167
170
168
<div algorithm>
@@ -312,6 +310,7 @@ removed from the <a>list of notifications</a>.
312
310
<a for="powerful feature">name</a> "<dfn export permission><code>notifications</code></dfn> ".
313
311
[[!Permissions]]
314
312
313
+ <div algorithm>
315
314
<p> To <dfn>get the notifications permission state</dfn> , run these steps:
316
315
317
316
<ol>
@@ -322,6 +321,7 @@ removed from the <a>list of notifications</a>.
322
321
323
322
<li><p> Return <var> permissionState</var> .
324
323
</ol>
324
+ </div>
325
325
326
326
327
327
<h3 id=direction>Direction</h3>
@@ -366,11 +366,11 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[!
366
366
367
367
<h3 id=resources>Resources</h3>
368
368
369
- <p> The <dfn>fetch steps</dfn> for a given
370
- <a >notification</a> <var> notification</var> are:
369
+ <div algorithm>
370
+ <p> The <dfn>fetch steps</dfn> for a given <a for=/ >notification</a> <var> notification</var> are:
371
371
372
372
<ol>
373
- <!-- XXX https://www.w3.org/Bugs/Public/show_bug.cgi?id=24055 -->
373
+ <!-- XXX image fetching is underspecified: https://github.com/whatwg/html/issues/4474 -->
374
374
<li>
375
375
<p> If the notification platform supports images, <a for=/>fetch</a>
376
376
<var> notification</var> 's <a>image URL</a> , if <a>image URL</a> is set.
@@ -460,12 +460,13 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[!
460
460
</ol>
461
461
</li>
462
462
</ol>
463
+ </div>
463
464
464
465
465
466
<h3 id=showing-a-notification>Showing a notification</h3>
466
467
467
- <p> The <dfn>show steps</dfn> for a given
468
- <a >notification</a> <var> notification</var> are:
468
+ <div algorithm>
469
+ <p> The <dfn>show steps</dfn> for a given <a for=/ >notification</a> <var> notification</var> are:
469
470
<!-- These steps are invoked from "in parallel" steps -->
470
471
471
472
<ol>
@@ -524,11 +525,13 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[!
524
525
to <a>fire an event</a> named <code> show</code> on the {{Notification}} object representing
525
526
<var> notification</var> .
526
527
</ol>
528
+ </div>
527
529
528
530
529
531
<h3 id=activating-a-notification>Activating a notification</h3>
530
532
531
- <p> When a <a>notification</a> <var> notification</var> , or one of its
533
+ <div algorithm="activate steps">
534
+ <p> When a <a for=/>notification</a> <var> notification</var> , or one of its
532
535
<a for=notification>actions</a> , is activated by the end user, assuming the underlying notification
533
536
platform supports activation, the user agent must (unless otherwise specified) run these steps:
534
537
@@ -564,14 +567,16 @@ platform supports activation, the user agent must (unless otherwise specified) r
564
567
</ol>
565
568
566
569
<p class="note"> Throughout the web platform "activate" is intentionally misnamed as "click".
570
+ </div>
567
571
568
572
569
573
<h3 id=closing-a-notification>Closing a notification</h3>
570
574
571
575
<p> When a <a>notification</a> is closed, either by the underlying notification platform or by the
572
576
end user, the <a>close steps</a> for it must be run.
573
577
574
- <p> The <dfn>close steps</dfn> for a given <var> notification</var> are:
578
+ <div algorithm>
579
+ <p> The <dfn>close steps</dfn> for a given <a for=/>notification</a> <var> notification</var> are:
575
580
576
581
<ol>
577
582
<li><p> If the <a>list of notifications</a> does not <a for=list>contain</a>
@@ -581,8 +586,10 @@ end user, the <a>close steps</a> for it must be run.
581
586
582
587
<li><p> <a for=list>Remove</a> <var> notification</var> from the <a>list of notifications</a> .
583
588
</ol>
589
+ </div>
584
590
585
- <p> To <dfn>handle close events</dfn> given a <var> notification</var> , run these steps:
591
+ <div algorithm>
592
+ <p> To <dfn>handle close events</dfn> given a <a for=/>notification</a> <var> notification</var> :
586
593
587
594
<ol>
588
595
<li><p> If <var> notification</var> is a <a>persistent notification</a> and <var> notification</var>
@@ -593,16 +600,20 @@ end user, the <a>close steps</a> for it must be run.
593
600
to <a>fire an event</a> named <code> close</code> on the {{Notification}} object representing
594
601
<var> notification</var> .
595
602
</ol>
603
+ </div>
596
604
597
605
598
606
<h3 id=alerting-the-user>Alerting the end user</h3>
599
607
600
- <p> The <dfn>alert steps</dfn> for alerting the end user about a given <var> notification</var> are:
608
+ <div algorithm>
609
+ <p> The <dfn>alert steps</dfn> for alerting the end user about a given <a for=/>notification</a>
610
+ <var> notification</var> are:
601
611
602
612
<ol>
603
613
<li><p> <a>Perform vibration</a> using <var> notification</var> 's
604
614
<a for=notification>vibration pattern</a> , if any.
605
615
</ol>
616
+ </div>
606
617
607
618
608
619
<h2 id=api>API</h2>
0 commit comments