gecko-dev/dom/serviceworkers/test/sw_file_upload.js

14 строки
238 B
JavaScript

self.skipWaiting();
addEventListener('fetch', event => {
event.respondWith(
fetch(event.request)
);
});
addEventListener('message', function(event) {
if (event.data === 'claim') {
event.waitUntil(clients.claim());
}
});