1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
6 * The origin of this IDL file is
7 * https://w3c.github.io/ServiceWorker/#cache-interface
10 [Exposed=(Window,Worker),
11 Func="nsGlobalWindowInner::CachesEnabled"]
14 Promise<Response> match(RequestInfo request, optional CacheQueryOptions options = {});
16 Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options = {});
17 [NewObject, NeedsCallerType]
18 Promise<undefined> add(RequestInfo request);
19 [NewObject, NeedsCallerType]
20 Promise<undefined> addAll(sequence<RequestInfo> requests);
22 Promise<undefined> put(RequestInfo request, Response response);
24 Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options = {});
26 Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options = {});
29 dictionary CacheQueryOptions {
30 boolean ignoreSearch = false;
31 boolean ignoreMethod = false;
32 boolean ignoreVary = false;
35 dictionary CacheBatchOperation {
39 CacheQueryOptions options;