sw: start immediately

cap
Varun Patil 2022-12-07 12:33:49 -08:00
parent 665fe9be85
commit aecc528f38
1 changed files with 6 additions and 0 deletions

View File

@ -36,3 +36,9 @@ registerRoute(/^.*\/.*$/, new NetworkFirst({
}), }),
], ],
})); }));
self.addEventListener('activate', event => {
// Take control of all pages under this SW's scope immediately,
// instead of waiting for reload/navigation.
event.waitUntil(self.clients.claim());
});