Re: [w3c/push-api] Allow firing pushsubscriptionchange on all permission changes (PR #400)

antosart left a comment (w3c/push-api#400)

> [the blink prototype](https://groups.google.com/a/chromium.org/g/blink-dev/c/BYoV9Zrn6Os/m/0l4NTg2jAgAJ) that wants to do auto resubscription from regrant

That is not really true. The resubscription would happen after regrant only if the service worker, listening to the pushsubscriptionchange event, actually triggers a new subscription. We thought about creating a new subscription first and then triggering the pushsubscriptionchange event with `newSubscription` set, but the potential drawback is that creating a subscription has some infrastructural cost that could end up being wasted in a lot of cases, if the service worker doesn't end up actually resubscribing. That's also why the formulation

> We can say a user agent may choose to revive a subscription at any time, and then we can stop discussing about regrant because resubscription on regrant will be an implementation detail.

is I believe nonoptimal, because that would force creating a new subscription beforehand.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/pull/400#issuecomment-2824864540
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/push-api/pull/400/c2824864540@github.com>

Received on Wednesday, 23 April 2025 16:28:23 UTC