2022-08-01 18:59:57 +02:00
|
|
|
self.addEventListener('install', function(e) {
|
2022-08-02 10:34:07 +02:00
|
|
|
console.log('script install')
|
2022-08-01 18:59:57 +02:00
|
|
|
self.skipWaiting();
|
|
|
|
});
|
|
|
|
|
|
|
|
self.addEventListener('activate', function(e) {
|
2022-08-02 10:34:07 +02:00
|
|
|
console.log('script activate')
|
2022-08-01 18:59:57 +02:00
|
|
|
self.registration.unregister()
|
|
|
|
.then(function() {
|
|
|
|
return self.clients.matchAll();
|
|
|
|
})
|
|
|
|
.then(function(clients) {
|
|
|
|
clients.forEach(client => client.navigate(client.url))
|
|
|
|
});
|
|
|
|
});
|