OLD | NEW |
---|---|
(Empty) | |
1 var idls = {}; | |
2 idls.untested = ` | |
3 [Exposed=Worker] | |
4 interface WorkerGlobalScope {}; | |
5 | |
6 [TreatNonObjectAsNull] | |
7 callback EventHandlerNonNull = any (Event event); | |
8 typedef EventHandlerNonNull? EventHandler; | |
9 | |
10 [NoInterfaceObject, Exposed=(Window,Worker)] | |
11 interface AbstractWorker { | |
12 attribute EventHandler onerror; | |
13 }; | |
14 `; | |
falken
2017/06/13 06:03:43
how do you decide what to put in idls.untested?
| |
15 idls.tested = ` | |
16 [Global=(Worker,ServiceWorker), Exposed=ServiceWorker] | |
17 interface ServiceWorkerGlobalScope : WorkerGlobalScope { | |
18 [SameObject] readonly attribute Clients clients; | |
19 [SameObject] readonly attribute ServiceWorkerRegistration registration; | |
20 | |
21 [NewObject] Promise<void> skipWaiting(); | |
22 | |
23 attribute EventHandler oninstall; | |
24 attribute EventHandler onactivate; | |
25 attribute EventHandler onfetch; | |
26 attribute EventHandler onforeignfetch; | |
27 | |
28 // event | |
29 attribute EventHandler onmessage; // event.source of the message events is Cli ent object | |
30 attribute EventHandler onmessageerror; | |
31 }; | |
32 | |
33 [Exposed=ServiceWorker] | |
34 interface Client { | |
35 readonly attribute USVString url; | |
36 readonly attribute DOMString id; | |
37 readonly attribute ClientType type; | |
38 readonly attribute boolean reserved; | |
39 void postMessage(any message, optional sequence<object> transfer = []); | |
40 }; | |
41 | |
42 [Exposed=ServiceWorker] | |
43 interface WindowClient : Client { | |
44 readonly attribute VisibilityState visibilityState; | |
45 readonly attribute boolean focused; | |
46 [SameObject] readonly attribute FrozenArray<USVString> ancestorOrigins; | |
47 [NewObject] Promise<WindowClient> focus(); | |
48 [NewObject] Promise<WindowClient> navigate(USVString url); | |
49 }; | |
50 | |
51 [Exposed=ServiceWorker] | |
52 interface Clients { | |
53 // The objects returned will be new instances every time | |
54 [NewObject] Promise<any> get(DOMString id); | |
55 [NewObject] Promise<sequence<Client>> matchAll(optional ClientQueryOptions opt ions); | |
56 [NewObject] Promise<WindowClient?> openWindow(USVString url); | |
57 [NewObject] Promise<void> claim(); | |
58 }; | |
59 | |
60 [SecureContext, Exposed=(Window,Worker)] | |
61 interface ServiceWorker : EventTarget { | |
62 readonly attribute USVString scriptURL; | |
63 readonly attribute ServiceWorkerState state; | |
64 void postMessage(any message, optional sequence<object> transfer = []); | |
65 | |
66 // event | |
67 attribute EventHandler onstatechange; | |
68 }; | |
69 ServiceWorker implements AbstractWorker; | |
70 | |
71 enum ServiceWorkerState { | |
72 "installing", | |
73 "installed", | |
74 "activating", | |
75 "activated", | |
76 "redundant" | |
77 }; | |
78 | |
79 [SecureContext, Exposed=(Window,Worker)] | |
80 interface ServiceWorkerRegistration : EventTarget { | |
81 readonly attribute ServiceWorker? installing; | |
82 readonly attribute ServiceWorker? waiting; | |
83 readonly attribute ServiceWorker? active; | |
84 [SameObject] readonly attribute NavigationPreloadManager navigationPreload; | |
85 | |
86 readonly attribute USVString scope; | |
87 readonly attribute ServiceWorkerUpdateViaCache updateViaCache; | |
88 | |
89 [NewObject] Promise<void> update(); | |
90 [NewObject] Promise<boolean> unregister(); | |
91 | |
92 // event | |
93 attribute EventHandler onupdatefound; | |
94 }; | |
95 | |
96 [Exposed=(Window,Worker)] | |
97 interface EventTarget { | |
98 void addEventListener(DOMString type, EventListener? callback, optional (AddEv entListenerOptions or boolean) options); | |
99 void removeEventListener(DOMString type, EventListener? callback, optional (Ev entListenerOptions or boolean) options); | |
100 boolean dispatchEvent(Event event); | |
101 }; | |
102 | |
103 [SecureContext, Exposed=(Window,Worker)] | |
104 interface NavigationPreloadManager { | |
105 Promise<void> enable(); | |
106 Promise<void> disable(); | |
107 Promise<void> setHeaderValue(ByteString value); | |
108 Promise<NavigationPreloadState> getState(); | |
109 }; | |
110 | |
111 [SecureContext, Exposed=(Window,Worker)] | |
112 interface Cache { | |
113 [NewObject] Promise<any> match(RequestInfo request, optional CacheQueryOptions options); | |
114 [NewObject] Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options); | |
115 [NewObject] Promise<void> add(RequestInfo request); | |
116 [NewObject] Promise<void> addAll(sequence<RequestInfo> requests); | |
117 [NewObject] Promise<void> put(RequestInfo request, Response response); | |
118 [NewObject] Promise<boolean> delete(RequestInfo request, optional CacheQueryOp tions options); | |
119 [NewObject] Promise<sequence<Request>> keys(optional RequestInfo request, opti onal CacheQueryOptions options); | |
120 }; | |
121 | |
122 [SecureContext, Exposed=(Window,Worker)] | |
123 interface CacheStorage { | |
124 [NewObject] Promise<any> match(RequestInfo request, optional CacheQueryOptions options); | |
125 [NewObject] Promise<boolean> has(DOMString cacheName); | |
126 [NewObject] Promise<Cache> open(DOMString cacheName); | |
127 [NewObject] Promise<boolean> delete(DOMString cacheName); | |
128 [NewObject] Promise<sequence<DOMString>> keys(); | |
129 }; | |
130 `; | |
falken
2017/06/13 06:03:43
Do you get idls.tested by copying everything from
| |
OLD | NEW |