fix(web): improve request cancellation handling in service worker cache (#19217)

This commit is contained in:
Min Idzelis
2025-07-01 06:53:04 -04:00
committed by GitHub
parent 53f80393bf
commit 8ccca04e27
3 changed files with 141 additions and 41 deletions
+3 -1
View File
@@ -3,7 +3,8 @@
/// <reference lib="esnext" />
/// <reference lib="webworker" />
import { installBroadcastChannelListener } from './broadcast-channel';
import { deleteOldCaches, handleFetchEvent } from './fetch-event';
import { deleteOldCaches } from './cache';
import { handleFetchEvent } from './fetch-event';
const sw = globalThis as unknown as ServiceWorkerGlobalScope;
@@ -14,6 +15,7 @@ const handleActivate = (event: ExtendableEvent) => {
const handleInstall = (event: ExtendableEvent) => {
event.waitUntil(sw.skipWaiting());
// do not preload app resources
};
sw.addEventListener('install', handleInstall, { passive: true });