OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <title>Service Workers: ServiceWorker</title> | 3 <title>Service Workers: ServiceWorker</title> |
4 <head> | 4 <head> |
5 <link rel="help" href="https://w3c.github.io/ServiceWorker/#service-work
er-obj"> | 5 <link rel="help" href="https://w3c.github.io/ServiceWorker/#service-work
er-obj"> |
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> |
(...skipping 12 matching lines...) Expand all Loading... |
23 attribute EventHandler onstatechange; | 23 attribute EventHandler onstatechange; |
24 }; | 24 }; |
25 | 25 |
26 enum ServiceWorkerState { | 26 enum ServiceWorkerState { |
27 "installing", | 27 "installing", |
28 "installed", | 28 "installed", |
29 "activating", | 29 "activating", |
30 "activated", | 30 "activated", |
31 "redundant" | 31 "redundant" |
32 }; | 32 }; |
33 </pre> | 33 </script> |
34 | 34 |
35 <!-- | 35 <!-- |
36 The `ServiceWorker` interface represents the document-side view of a Service | 36 The `ServiceWorker` interface represents the document-side view of a Service |
37 Worker. This object provides a no-op constructor. Callers should note that only | 37 Worker. This object provides a no-op constructor. Callers should note that only |
38 `ServiceWorker` objects created by the user agent (see | 38 `ServiceWorker` objects created by the user agent (see |
39 `navigator.serviceWorker.installing`, `navigator.serviceWorker.waiting`, | 39 `navigator.serviceWorker.installing`, `navigator.serviceWorker.waiting`, |
40 `navigator.serviceWorker.active` and `navigator.serviceWorker.controller`) will | 40 `navigator.serviceWorker.active` and `navigator.serviceWorker.controller`) will |
41 provide meaningful functionality. | 41 provide meaningful functionality. |
42 --> | 42 --> |
43 | 43 |
44 | 44 |
45 <script type=text/plain id="untested_idls"> | 45 <script type=text/plain id="untested_idls"> |
46 interface EventHandler {}; | 46 interface EventHandler {}; |
47 interface Worker {}; | 47 interface Worker {}; |
48 </pre> | 48 </script> |
49 | 49 |
50 <script> | 50 <script> |
51 var idl_array = new IdlArray(); | 51 var idl_array = new IdlArray(); |
52 idl_array.add_untested_idls(document.getElementById("untested_idls").tex
tContent); | 52 idl_array.add_untested_idls(document.getElementById("untested_idls").tex
tContent); |
53 idl_array.add_idls(document.getElementById("idl_0").textContent); | 53 idl_array.add_idls(document.getElementById("idl_0").textContent); |
54 idl_array.add_objects({ | 54 idl_array.add_objects({ |
55 ServiceWorker: ["throw new Error ('No object defined for the Service
Worker interface')"], | 55 ServiceWorker: ["throw new Error ('No object defined for the Service
Worker interface')"], |
56 ServiceWorkerState: ["throw new Error ('No object defined for the Se
rviceWorkerState enum')"] | 56 ServiceWorkerState: ["throw new Error ('No object defined for the Se
rviceWorkerState enum')"] |
57 }); | 57 }); |
58 idl_array.test(); | 58 idl_array.test(); |
59 </script> | 59 </script> |
60 | 60 |
61 </body> | 61 </body> |
62 </html> | 62 </html> |
63 | 63 |
OLD | NEW |