0
0
mirror of https://github.com/puppeteer/puppeteer synced 2024-06-14 14:02:48 +00:00
puppeteer/website/static/sw.js

16 lines
316 B
JavaScript
Raw Normal View History

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