OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <title>Service Workers: ServiceWorkerClients</title> | 3 <title>Service Workers: ServiceWorkerClients</title> |
4 <head> | 4 <head> |
5 <link rel="help" href="https://w3c.github.io/ServiceWorker/#service-work
er-clients"> | 5 <link rel="help" href="https://w3c.github.io/ServiceWorker/#service-work
er-clients"> |
6 <script src="/resources/testharness.js"></script> | 6 <script src="/resources/testharness.js"></script> |
7 <script src="/resources/testharnessreport.js"></script> | 7 <script src="/resources/testharnessreport.js"></script> |
8 | 8 |
9 <script src=/resources/WebIDLParser.js></script> | 9 <script src=/resources/WebIDLParser.js></script> |
10 <script src=/resources/idlharness.js></script> | 10 <script src=/resources/idlharness.js></script> |
11 | 11 |
12 </head> | 12 </head> |
13 <body> | 13 <body> |
14 | 14 |
15 <script type=text/plain id="idl_0"> | 15 <script type=text/plain id="idl_0"> |
16 interface ServiceWorkerClients { | 16 interface ServiceWorkerClients { |
17 // A list of client objects, identifiable by ID, that correspond to windows | 17 // A list of client objects, identifiable by ID, that correspond to windows |
18 // (or workers) that are "controlled" by this SW | 18 // (or workers) that are "controlled" by this SW |
19 Promise<sequence<Client>?> getServiced(); | 19 Promise<sequence<Client>?> getServiced(); |
20 Promise<any> reloadAll(); | 20 Promise<any> reloadAll(); |
21 }; | 21 }; |
22 </pre> | 22 </script> |
23 | 23 |
24 <!-- | 24 <!-- |
25 The `ServiceWorkerClients` interface represents a container for a list of | 25 The `ServiceWorkerClients` interface represents a container for a list of |
26 `[Client][1]` objects. | 26 `[Client][1]` objects. |
27 | 27 |
28 [1]: #client-interface | 28 [1]: #client-interface |
29 --> | 29 --> |
30 | 30 |
31 | 31 |
32 <script type=text/plain id="untested_idls"> | 32 <script type=text/plain id="untested_idls"> |
33 interface Client {}; | 33 interface Client {}; |
34 </pre> | 34 </script> |
35 | 35 |
36 <script> | 36 <script> |
37 var idl_array = new IdlArray(); | 37 var idl_array = new IdlArray(); |
38 idl_array.add_untested_idls(document.getElementById("untested_idls").tex
tContent); | 38 idl_array.add_untested_idls(document.getElementById("untested_idls").tex
tContent); |
39 idl_array.add_idls(document.getElementById("idl_0").textContent); | 39 idl_array.add_idls(document.getElementById("idl_0").textContent); |
40 idl_array.add_objects({ | 40 idl_array.add_objects({ |
41 ServiceWorkerClients: ["throw new Error ('No object defined for the
ServiceWorkerClients interface')"] | 41 ServiceWorkerClients: ["throw new Error ('No object defined for the
ServiceWorkerClients interface')"] |
42 }); | 42 }); |
43 idl_array.test(); | 43 idl_array.test(); |
44 </script> | 44 </script> |
45 | 45 |
46 </body> | 46 </body> |
47 </html> | 47 </html> |
48 | 48 |
OLD | NEW |