shellphone.app/app/service-worker/activate.ts
2022-06-01 23:56:37 +02:00

11 lines
294 B
TypeScript

declare let self: ServiceWorkerGlobalScope;
export default async function handleActivate(event: ExtendableEvent) {
console.debug("Service worker activated");
// @ts-ignore
if (self.registration.navigationPreload) {
// @ts-ignore
await self.registration.navigationPreload.enable();
}
}