pushsubscriptionchange event doesn't have oldSubscription in it.

Abierto
#325 9 comentarios 6 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
20/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
html
Área
web-dev

Línea de trabajo

The issue asks why oldSubscription and newSubscription are undefined when pushsubscriptionchange is triggered through Firefox notification settings, and whether the proposed resubscription approach follows the standard. Start by reading the linked Mozilla event documentation and the referenced Chromium issue. The issue does not identify a code file or test; done would require resolving the behavior and expected approach, which the issue text alone does not establish.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

editorial

Hi...

It's finally assumed that pushsubscriptionchange never fires in chrome. and It's somehow understandable since their subscriptions never expire. Before we decide to start discussing this, I must say that's what information I got here https://bugs.chromium.org/p/chromium/issues/detail?id=1078367&q=Pri%3D%223%22#makechanges.

Question 1)

So I still decided to use this event for mozilla users. and I want to use event.oldSubscription and event.newSubscription in there. The way I triggered this event is simply by blocking and allowing notifications from mozilla's preference's notification's settings.

Question: 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 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?

Lenguaje dominante
HTML
Estrellas
158
Forks
43
Merge medio
2 d 6 h
PR fusionados (30 d)
2

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de w3c/push-api

Todos los issues de w3c/push-api

Issues similares

Más issues de Web Dev

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.