From d5618b0cf674f6c9284f3811eac86ae0806cdc3e Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 23 Aug 2024 11:33:43 +0200 Subject: [PATCH] Mark persistent notifications as a tracking vector Also sprinkle some more `
` around. --- notifications.bs | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/notifications.bs b/notifications.bs index b968966..f717133 100644 --- a/notifications.bs +++ b/notifications.bs @@ -160,11 +160,9 @@ clipped corners.

A non-persistent notification is a notification whose service worker registration is null. -

A persistent notification is a notification whose +

A persistent notification is a notification whose service worker registration is non-null. - -


@@ -312,6 +310,7 @@ removed from the list of notifications. name "notifications". [[!Permissions]] +

To get the notifications permission state, run these steps:

    @@ -322,6 +321,7 @@ removed from the list of notifications.
  1. Return permissionState.

+

Direction

@@ -366,11 +366,11 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[!

Resources

-

The fetch steps for a given -notification notification are: +

+

The fetch steps for a given notification notification are:

    - +
  1. If the notification platform supports images, fetch notification's image URL, if image URL is set. @@ -460,12 +460,13 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[!

+

Showing a notification

-

The show steps for a given -notification notification are: +

+

The show steps for a given notification notification are:

    @@ -524,11 +525,13 @@ interpreted as a language tag. Validity or well-formedness are not enforced. [[! to fire an event named show on the {{Notification}} object representing notification.
+

Activating a notification

-

When a notification notification, or one of its +

+

When a notification notification, or one of its actions, is activated by the end user, assuming the underlying notification platform supports activation, the user agent must (unless otherwise specified) run these steps: @@ -564,6 +567,7 @@ platform supports activation, the user agent must (unless otherwise specified) r

Throughout the web platform "activate" is intentionally misnamed as "click". +

Closing a notification

@@ -571,7 +575,8 @@ platform supports activation, the user agent must (unless otherwise specified) r

When a notification is closed, either by the underlying notification platform or by the end user, the close steps for it must be run. -

The close steps for a given notification are: +

+

The close steps for a given notification notification are:

  1. If the list of notifications does not contain @@ -581,8 +586,10 @@ end user, the close steps for it must be run.

  2. Remove notification from the list of notifications.

+
-

To handle close events given a notification, run these steps: +

+

To handle close events given a notification notification:

  1. If notification is a persistent notification and notification @@ -593,16 +600,20 @@ end user, the close steps for it must be run. to fire an event named close on the {{Notification}} object representing notification.

+

Alerting the end user

-

The alert steps for alerting the end user about a given notification are: +

+

The alert steps for alerting the end user about a given notification +notification are:

  1. Perform vibration using notification's vibration pattern, if any.

+

API