puppeteer/test/assets/serviceworkers/fetch/sw.js
2018-03-15 16:58:02 -07:00

8 lines
175 B
JavaScript

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