playwright/tests/assets/serviceworkers/fetch/sw.js

8 lines
175 B
JavaScript

self.addEventListener('fetch', event => {
event.respondWith(fetch(event.request));
});
self.addEventListener('activate', event => {
event.waitUntil(clients.claim());
});