[w3c/push-api] Pass removed subscriptions as a property of the `pushsubscriptionchange` event (#193)

@collimarco points out in http://blog.pushpad.xyz/2016/05/the-push-api-and-its-wild-unsubscription-mechanism/ that we don't currently pass the removed subscription when we fire `pushsubscriptionchange`. At that point, `self.registration.pushManager.getSubscription()` will resolve to `null`, because the old subscription has been removed.

An app can work around this by storing the subscription endpoint in IDB, then retrieving it when `pushsubscriptionchange` is fired. Alternatively, we can pass the old subscription along, maybe as a property on the event:

```webidl
interface PushSubscriptionEvent : ExtendableEvent {
  readonly attribute PushSubscription subscription;
}
```

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/issues/193

Received on Tuesday, 24 May 2016 18:46:03 UTC