16 lines
316 B
JavaScript
16 lines
316 B
JavaScript
|
self.addEventListener('install', () => {
|
||
|
self.skipWaiting();
|
||
|
});
|
||
|
|
||
|
self.addEventListener('activate', () => {
|
||
|
self.clients
|
||
|
.matchAll({
|
||
|
type: 'window',
|
||
|
})
|
||
|
.then(windowClients => {
|
||
|
windowClients.forEach(windowClient => {
|
||
|
windowClient.navigate(windowClient.url);
|
||
|
});
|
||
|
});
|
||
|
});
|