mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-18 18:00:31 +00:00
Although our cache storage is ephemeral, it is otherwise written to spec and should not cause any issues.
21 lines
815 B
Text
21 lines
815 B
Text
#import <Fetch/Request.idl>
|
|
#import <ServiceWorker/Cache.idl>
|
|
|
|
// https://w3c.github.io/ServiceWorker/#cachestorage-interface
|
|
[SecureContext, Exposed=(Window,Worker)]
|
|
interface CacheStorage {
|
|
[NewObject] Promise<(Response or undefined)> match(RequestInfo request, optional MultiCacheQueryOptions options = {});
|
|
[NewObject] Promise<boolean> has(DOMString cacheName);
|
|
[NewObject] Promise<Cache> open(DOMString cacheName);
|
|
[NewObject] Promise<boolean> delete(DOMString cacheName);
|
|
[NewObject] Promise<sequence<DOMString>> keys();
|
|
};
|
|
|
|
dictionary MultiCacheQueryOptions : CacheQueryOptions {
|
|
DOMString cacheName;
|
|
};
|
|
|
|
// https://w3c.github.io/ServiceWorker/#self-caches
|
|
partial interface mixin WindowOrWorkerGlobalScope {
|
|
[SecureContext, SameObject] readonly attribute CacheStorage caches;
|
|
};
|