Skip to content

Truly independent web browser

1.2 KB
Raw Blame
// https://w3c.github.io/ServiceWorker/#cache-interface
[SecureContext, Exposed=(Window,Worker)]
interface Cache {
    [NeedsCallerRealm, NewObject, CreatesPromise] Promise<(Response or undefined)> match(RequestInfo request, optional CacheQueryOptions options = {});
    [NeedsCallerRealm, NewObject, CreatesPromise] Promise<FrozenArray<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options = {});
    [NeedsCallerRealm, NewObject, CreatesPromise] Promise<undefined> add(RequestInfo request);
    [NeedsCallerRealm, NewObject, CreatesPromise] Promise<undefined> addAll(sequence<RequestInfo> requests);
    [NeedsCallerRealm, NewObject, CreatesPromise] Promise<undefined> put(RequestInfo request, Response response);
    [NeedsCallerRealm, NewObject, CreatesPromise] Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options = {});
    [NeedsCallerRealm, NewObject, CreatesPromise] Promise<FrozenArray<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options = {});
};

dictionary CacheQueryOptions {
    boolean ignoreSearch = false;
    boolean ignoreMethod = false;
    boolean ignoreVary = false;
};