pushsubscriptionchange event doesn't have oldSubscription/newSubscription (using ExtendableEvent instead of PushSubscriptionChangeEvent)
Categories
(Core :: DOM: Push Subscriptions, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox137 | --- | fixed |
People
(Reporter: glagh14, Assigned: saschanaz)
References
(Blocks 2 open bugs)
Details
(Whiteboard: dom-lws-bugdash-triage)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4132.0 Safari/537.36
Steps to reproduce:
Question 1) I want to use event.oldSubscription and event.newSubscription in pushsubscriptionchange event. At least this is what w3c specs say and people about this. The way I triggered this event is simply by blocking and allowing notifications from mozilla's preference's notification's settings. i consoled.log event.oldSubscription and event.newSubscription
Question 2)
I have seen on the mozilla docs page, that the way it handles pushsubscriptionchange event is that in that event, it tries to subscribe again by using the event.oldSubscription. https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/pushsubscriptionchange_event .
Question: Is this the standard approach or would the last lines of code on the following website https://pushpad.xyz/service-worker.js be enough?
Actual results:
Question 1) oldSubscription and newSubscription are both undefined. Why? could this be because of the way I trigger it? and if mozilla itself triggers this, would they NOT be undefined at that stage?
Question 2) I'd appreciate the answer to the above I put in what did you do
section
Expected results:
Question 1) oldSubscription and newSubscription shouldn't be undefined.
Question 2) I'd appreciate the answer to the above I put in what did you do
section
(In reply to glagh14 from comment #0)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4132.0 Safari/537.36
Steps to reproduce:
Question 1) I want to use
event.oldSubscription
and event.newSubscription inpushsubscriptionchange
event. At least this is what w3c specs say and people about this. The way I triggered this event is simply by blocking and allowing notifications from mozilla's preference's notification's settings. i consoled.logevent.oldSubscription
andevent.newSubscription
Question 2)
I have seen on the mozilla docs page, that the way it handles
pushsubscriptionchange
event is that in that event, it tries to subscribe again by using the event.oldSubscription. https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/pushsubscriptionchange_event .Question: Is this the standard approach or would the last lines of code on the following website https://pushpad.xyz/service-worker.js be enough?
Actual results:
Question 1) oldSubscription and newSubscription are both undefined. Why? could this be because of the way I trigger it? and if mozilla itself triggers this, would they NOT be undefined at that stage?
Question 2) I'd appreciate the answer to the above I put in
what did you do
sectionExpected results:
Question 1) oldSubscription and newSubscription shouldn't be undefined.
Question 2) I'd appreciate the answer to the above I put in
what did you do
section
Comment 2•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•7 months ago
|
Assignee | ||
Updated•7 months ago
|
Assignee | ||
Comment 3•3 months ago
|
||
Assignee | ||
Comment 4•3 months ago
|
||
Updated•3 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Comment 6•2 months ago
|
||
Backed out for causiung geckoview failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/1658e541c100c747e8119c5848cd739619a0fb5e
Failure log: https://treeherder.mozilla.org/logviewer?job_id=494064009&repo=autoland&lineNumber=23185
Assignee | ||
Updated•2 months ago
|
Comment 8•2 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/60accb9c03d0
https://hg.mozilla.org/mozilla-central/rev/9b6a7e93e074
Description
•