puppeteer/website/static/sw.js
2022-07-05 15:41:43 +02:00

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);
});
});
});