Skip to content

Commit d5618b0

Browse files
authored
Mark persistent notifications as a tracking vector
Also sprinkle some more `<div algorithm>` around.
1 parent 9a8242e commit d5618b0

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

notifications.bs

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,9 @@ clipped corners.
160160
<p>A <dfn>non-persistent notification</dfn> is a <a>notification</a> whose
161161
<a for=notification>service worker registration</a> is null.
162162

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
164164
<a for=notification>service worker registration</a> is non-null.
165165

166-
<!-- XXX https://html.spec.whatwg.org/#fingerprinting-vector -->
167-
168166
<hr>
169167

170168
<div algorithm>
@@ -312,6 +310,7 @@ removed from the <a>list of notifications</a>.
312310
<a for="powerful feature">name</a> "<dfn export permission><code>notifications</code></dfn>".
313311
[[!Permissions]]
314312

313+
<div algorithm>
315314
<p>To <dfn>get the notifications permission state</dfn>, run these steps:
316315

317316
<ol>
@@ -322,6 +321,7 @@ removed from the <a>list of notifications</a>.
322321

323322
<li><p>Return <var>permissionState</var>.
324323
</ol>
324+
</div>
325325

326326

327327
<h3 id=direction>Direction</h3>
@@ -366,11 +366,11 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[!
366366

367367
<h3 id=resources>Resources</h3>
368368

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:
371371

372372
<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 -->
374374
<li>
375375
<p>If the notification platform supports images, <a for=/>fetch</a>
376376
<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. [[!
460460
</ol>
461461
</li>
462462
</ol>
463+
</div>
463464

464465

465466
<h3 id=showing-a-notification>Showing a notification</h3>
466467

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:
469470
<!-- These steps are invoked from "in parallel" steps -->
470471

471472
<ol>
@@ -524,11 +525,13 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[!
524525
to <a>fire an event</a> named <code>show</code> on the {{Notification}} object representing
525526
<var>notification</var>.
526527
</ol>
528+
</div>
527529

528530

529531
<h3 id=activating-a-notification>Activating a notification</h3>
530532

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
532535
<a for=notification>actions</a>, is activated by the end user, assuming the underlying notification
533536
platform supports activation, the user agent must (unless otherwise specified) run these steps:
534537

@@ -564,14 +567,16 @@ platform supports activation, the user agent must (unless otherwise specified) r
564567
</ol>
565568

566569
<p class="note">Throughout the web platform "activate" is intentionally misnamed as "click".
570+
</div>
567571

568572

569573
<h3 id=closing-a-notification>Closing a notification</h3>
570574

571575
<p>When a <a>notification</a> is closed, either by the underlying notification platform or by the
572576
end user, the <a>close steps</a> for it must be run.
573577

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:
575580

576581
<ol>
577582
<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.
581586

582587
<li><p><a for=list>Remove</a> <var>notification</var> from the <a>list of notifications</a>.
583588
</ol>
589+
</div>
584590

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>:
586593

587594
<ol>
588595
<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.
593600
to <a>fire an event</a> named <code>close</code> on the {{Notification}} object representing
594601
<var>notification</var>.
595602
</ol>
603+
</div>
596604

597605

598606
<h3 id=alerting-the-user>Alerting the end user</h3>
599607

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:
601611

602612
<ol>
603613
<li><p><a>Perform vibration</a> using <var>notification</var>'s
604614
<a for=notification>vibration pattern</a>, if any.
605615
</ol>
616+
</div>
606617

607618

608619
<h2 id=api>API</h2>

0 commit comments

Comments
 (0)