puppeteer/sw.js
release-please[bot] a373660554 deploy: b2c69fe5bd
2024-02-05 09:31:22 +00:00

21 lines
405 B
JavaScript

/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
self.addEventListener('install', () => {
self.skipWaiting();
});
self.addEventListener('activate', () => {
self.clients
.matchAll({
type: 'window',
})
.then(windowClients => {
windowClients.forEach(windowClient => {
windowClient.navigate(windowClient.url);
});
});
});