(request3, options = {})
| 61934 | if (errorData === null) { |
| 61935 | cacheJobPromise.resolve(); |
| 61936 | } else { |
| 61937 | cacheJobPromise.reject(errorData); |
| 61938 | } |
| 61939 | }); |
| 61940 | return cacheJobPromise.promise; |
| 61941 | } |
| 61942 | async delete(request3, options = {}) { |
| 61943 | webidl.brandCheck(this, _Cache); |
| 61944 | webidl.argumentLengthCheck(arguments, 1, { header: "Cache.delete" }); |
| 61945 | request3 = webidl.converters.RequestInfo(request3); |
| 61946 | options = webidl.converters.CacheQueryOptions(options); |
| 61947 | let r3 = null; |
| 61948 | if (request3 instanceof Request6) { |
| 61949 | r3 = request3[kState]; |
| 61950 | if (r3.method !== "GET" && !options.ignoreMethod) { |
| 61951 | return false; |
| 61952 | } |
| 61953 | } else { |
| 61954 | assert2(typeof request3 === "string"); |
| 61955 | r3 = new Request6(request3)[kState]; |
| 61956 | } |
| 61957 | const operations = []; |
| 61958 | const operation = { |
| 61959 | type: "delete", |
| 61960 | request: r3, |
| 61961 | options |
| 61962 | }; |
| 61963 | operations.push(operation); |
| 61964 | const cacheJobPromise = createDeferredPromise(); |
| 61965 | let errorData = null; |
| 61966 | let requestResponses; |
| 61967 | try { |
| 61968 | requestResponses = this.#batchCacheOperations(operations); |
| 61969 | } catch (e3) { |
| 61970 | errorData = e3; |
| 61971 | } |
| 61972 | queueMicrotask(() => { |
| 61973 | if (errorData === null) { |
| 61974 | cacheJobPromise.resolve(!!requestResponses?.length); |
| 61975 | } else { |
| 61976 | cacheJobPromise.reject(errorData); |
| 61977 | } |
nothing calls this directly
no test coverage detected