e3c60d1ef8
Most browsers don't support the pushsubscriptionchange event. We workaround this by saving the current push subscription in IndexedDB so we can check during every page load if the push subscription changed. If that is the case, we manually sync the push subscription with the server. However, this solution is not perfect as mentioned in https://medium.com/@madridserginho/how-to-handle-webpush-api-pushsubscriptionchange-event-in-modern-browsers-6e47840d756f which was used for reference: > This solution is not perfect, the user could lose some push notifications if he doesn’t open the webapp for a long time. Co-authored-by: ekzyis <ek@stacker.news> |
||
---|---|---|
.. | ||
build.js | ||
index.js |