Improve notification

This commit is contained in:
Peter Maquiran
2021-08-31 22:49:37 +01:00
parent 3437c19027
commit fb22023c5d
3 changed files with 57 additions and 4 deletions
+17
View File
@@ -0,0 +1,17 @@
self.addEventListener('install', function() {
self.skipWaiting();
});
self.addEventListener('activate', function(event) {
event.waitUntil(clients.claim());
});
self.addEventListener('notificationclick', function(event) {
// Close the notification when it is clicked
event.notification.close();
console.log(event)
});