The pushsubscriptionchange
event is fired by the browser when the push notification server wants the client to resubscribe. How can I manually trigger this event for testing?
相关问题
- PWAs on iOS 12 no longer shares Service Worker cac
- start_url does not respond with a 200 when offline
- Adding a new header to a Request, while preserving
- Angular 6 @angular/pwa - sw does not successfuly s
- Browser support for Service Worker Task Scheduler
相关文章
- Progressive web app(PWA) vs Electron vs Browser ex
- Is there a way to add badge notifications using pr
- Make Web push notification work using webview in a
- Manifest start_url is not cached by a Service Work
- Media Notifications using the Media Session Web AP
- How can we implement web push notification?
- Invalid registration error on sending push notific
- How to Manage state between tabs in Flutter App
The event is also triggered when the user removes and re-grants the push permission (see https://github.com/w3c/push-api/issues/116).
For example, in Firefox you can click on the site identity icon, in the "Permission" section, select "Block" for "Receive Notifications", then select "Allow".
A
pushsubscriptionchange
event will be triggered.Unfortunately it's not possible to do any end-to-end testing of this feature. The best you can do is fire the event via JS from the service worker: