Bug 1879816: Make nsCocoaWindow::Destroy close the window and let destruction happen...
[gecko.git] / dom / webidl / Cache.webidl
blobb7f676e3fe0539d9063c5a179f1d564fbe5b2663
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/.
5  *
6  * The origin of this IDL file is
7  * https://w3c.github.io/ServiceWorker/#cache-interface
8  */
10 [Exposed=(Window,Worker),
11  Func="nsGlobalWindowInner::CachesEnabled"]
12 interface Cache {
13   [NewObject]
14   Promise<Response> match(RequestInfo request, optional CacheQueryOptions options = {});
15   [NewObject]
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);
21   [NewObject]
22   Promise<undefined> put(RequestInfo request, Response response);
23   [NewObject]
24   Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options = {});
25   [NewObject]
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 {
36   DOMString type;
37   Request request;
38   Response response;
39   CacheQueryOptions options;