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
Родитель a0e714f67c
Коммит 359755abf1
2 изменённых файлов: 32 добавлений и 32 удалений

Просмотреть файл

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

Просмотреть файл

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