- From: Lina Cambridge <notifications@github.com>
- Date: Fri, 08 May 2020 00:29:10 -0700
- To: w3c/push-api <push-api@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/push-api/issues/325/625680151@github.com>
@novaknole No problem, I'm really glad that was helpful, and thanks for being so understanding! 1. Yep, by "old draft", I meant an old version of the Push API spec. `oldSubscription` and `newSubscription` got added in PR #234; before that, it was a simple `ExtendableEvent` with no special properties. 2. Right. In Firefox, `event.oldSubscription === undefined` and `event.newSubscription === undefined`, because it doesn't implement them yet. [Here's the code inside of Firefox that creates and triggers `pushsubscriptionchange`](https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/dom/serviceworkers/ServiceWorkerOp.cpp#755-756,759-760)—you can see it's creating a regular `ExtendableEvent` instead of a [`PushSubcriptionChangeEvent`](https://w3c.github.io/push-api/#pushsubscriptionchangeevent-interface) that the spec says we should create. That's also why Firefox's Web Platform Tests are [expected to fail for this feature](https://searchfox.org/mozilla-central/rev/dc4560dcaafd79375b9411fdbbaaebb0a59a93ac/testing/web-platform/meta/push-api/idlharness.https.any.js.ini#59-69,74-75,80-87). 3. Right, even if you install it as a PWA, `oldSubscription` and `newSubscription` will still be undefined. -- 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/325#issuecomment-625680151
Received on Friday, 8 May 2020 07:29:24 UTC