OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // See https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.htm
l#cache | |
6 | |
7 [ | |
8 GarbageCollected, | |
9 Exposed=ServiceWorker, | |
10 RuntimeEnabled=ServiceWorkerOnFetch, | |
11 ] interface Cache { | |
12 // FIXME: Blink doesn't support union types, we use overrides instead. See htt
p://crbug.com/240176 | |
13 | |
14 // [CallWith=ScriptState] Promise match((Request or ScalarValueString) request
, optional QueryParams queryParams); | |
15 [CallWith=ScriptState] Promise match(Request request, optional QueryParams que
ryParams); | |
16 [CallWith=ScriptState] Promise match(ScalarValueString request, optional Query
Params queryParams); | |
17 | |
18 // [CallWith=ScriptState] Promise matchAll((Request or ScalarValueString) requ
est, optional QueryParams queryParams); | |
19 [CallWith=ScriptState] Promise matchAll(Request request, optional QueryParams
queryParams); | |
20 [CallWith=ScriptState] Promise matchAll(ScalarValueString request, optional Qu
eryParams queryParams); | |
21 | |
22 // [CallWith=ScriptState] Promise add((Request or ScalarValueString) request); | |
23 [CallWith=ScriptState] Promise add(Request request); | |
24 [CallWith=ScriptState] Promise add(ScalarValueString request); | |
25 | |
26 // FIXME: The lack of union type support together with the sequence mean we ca
n't use overrides here, instead | |
27 // bind a generic type. | |
28 // [CallWith=ScriptState] Promise addAll(sequence<Request or ScalarValueString
> requests); | |
29 [CallWith=ScriptState] Promise addAll(sequence<any> requests); | |
30 | |
31 // [CallWith=ScriptState] Promise put((Request or ScalarValueString) request,
Response response); | |
32 [CallWith=ScriptState] Promise put(Request request, Response response); | |
33 [CallWith=ScriptState] Promise put(ScalarValueString request, Response respons
e); | |
34 | |
35 // [CallWith=ScriptState] Promise delete((Request or ScalarValueString) reques
t, optional QueryParams queryParams); | |
36 [CallWith=ScriptState, ImplementedAs=deleteFunction] Promise delete(Request re
quest, optional QueryParams queryParams); | |
37 [CallWith=ScriptState, ImplementedAs=deleteFunction] Promise delete(ScalarValu
eString request, optional QueryParams queryParams); | |
38 | |
39 // [CallWith=ScriptState] Promise keys(optional (Request or ScalarValueString)
request, optional QueryParams queryParams); | |
40 [CallWith=ScriptState] Promise keys(optional Request request, optional QueryPa
rams queryParams); | |
41 [CallWith=ScriptState] Promise keys(ScalarValueString request, optional QueryP
arams queryParams); | |
42 }; | |
OLD | NEW |