From 1bd228fbfe703f9727f680b68a777c0a44487b4a Mon Sep 17 00:00:00 2001 From: Antonio Sartori Date: Tue, 22 Apr 2025 11:38:34 +0200 Subject: [PATCH] Allow firing pushsubscriptionchange on all permission changes --- index.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/index.html b/index.html index e4b4acb..4ea0da6 100644 --- a/index.html +++ b/index.html @@ -342,6 +342,22 @@

`{name: "push", userVisibleOnly: false}` is [=PermissionDescriptor/stronger than=] `{name: "push", userVisibleOnly: true}`.

+

+ When the permission state changes (for example, it is revoked or re-granted), the user + agent MAY fire the "`pushsubscriptionchange`" event for subscriptions created + with that permission, with the service worker registration associated with + the push subscription as |registration|, a {{PushSubscription}} instance + representing the push subscription which should not be used anymore (for example, + because it has been or it is being deactivated) or `null` if it is not available + anymore as |oldSubscription|, and a {{PushSubscription}} representing a new valid push + subscription or `null` if none could be created as |newSubscription|. +

+

+ A permission state change can happen for a number of reasons, some of which are likely + vendor specific. Because of that, this specification does not mandate firing the + pushsubscriptionchange event in all possible cases, and instead leaves it up to + the user agent to decide when it is appropriate to do so. +