mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-25 11:18:35 +01:00
15 lines
330 B
JavaScript
15 lines
330 B
JavaScript
|
self.addEventListener('install', function () {
|
||
|
self.skipWaiting()
|
||
|
})
|
||
|
|
||
|
self.addEventListener('activate', function () {
|
||
|
self.registration
|
||
|
.unregister()
|
||
|
.then(function () {
|
||
|
return self.clients.matchAll()
|
||
|
})
|
||
|
.then(function (clients) {
|
||
|
clients.forEach((client) => client.navigate(client.url))
|
||
|
})
|
||
|
})
|