WebPush
unknown
plain_text
a year ago
314 B
5
Indexable
self.addEventListener('install', (event) => { console.log('SW Registered:', { event }); self.skipWaiting(); }); self.addEventListener('push', function(event) { const data = event.data.json(); console.log(data); event.waitUntil(self.registration.showNotification(data.notification.title, data)); });
Editor is loading...
Leave a Comment