puerta/internal/server/static/admin-serviceworker.js

12 lines
314 B
JavaScript

self.addEventListener("activate", event => {
console.log("Service worker activated");
});
self.addEventListener('push', (event) => {
let notification = event.data.text();
console.log(`got notification: ${notification}`)
console.log(`evt: `, event)
self.registration.showNotification(notification);
});