Bug 1160138 P1 Update CacheStorage and Cache webidl to latest spec. r=ehsan

This commit is contained in:
Ben Kelly 2015-05-05 15:45:36 -07:00
parent 0657271e96
commit 2f54d18cbd
2 changed files with 32 additions and 32 deletions

View File

@ -13,32 +13,32 @@
[Exposed=(Window,Worker),
Func="mozilla::dom::cache::Cache::PrefEnabled"]
interface Cache {
[Throws]
Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
[Throws]
Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
[Throws]
Promise<void> add(RequestInfo request);
[Throws]
Promise<void> addAll(sequence<RequestInfo> requests);
[Throws]
Promise<void> put(RequestInfo request, Response response);
[Throws]
Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
[Throws]
Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options);
[NewObject]
Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
[NewObject]
Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
[NewObject]
Promise<void> add(RequestInfo request);
[NewObject]
Promise<void> addAll(sequence<RequestInfo> requests);
[NewObject]
Promise<void> put(RequestInfo request, Response response);
[NewObject]
Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
[NewObject]
Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options);
};
dictionary CacheQueryOptions {
boolean ignoreSearch = false;
boolean ignoreMethod = false;
boolean ignoreVary = false;
DOMString cacheName;
boolean ignoreSearch = false;
boolean ignoreMethod = false;
boolean ignoreVary = false;
DOMString cacheName;
};
dictionary CacheBatchOperation {
DOMString type;
Request request;
Response response;
CacheQueryOptions options;
DOMString type;
Request request;
Response response;
CacheQueryOptions options;
};

View File

@ -13,14 +13,14 @@
[Exposed=(Window,Worker),
Func="mozilla::dom::cache::CacheStorage::PrefEnabled"]
interface CacheStorage {
[Throws]
Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
[Throws]
Promise<boolean> has(DOMString cacheName);
[Throws]
Promise<Cache> open(DOMString cacheName);
[Throws]
Promise<boolean> delete(DOMString cacheName);
[Throws]
Promise<sequence<DOMString>> keys();
[NewObject]
Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
[NewObject]
Promise<boolean> has(DOMString cacheName);
[NewObject]
Promise<Cache> open(DOMString cacheName);
[NewObject]
Promise<boolean> delete(DOMString cacheName);
[NewObject]
Promise<sequence<DOMString>> keys();
};