OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <title>Service Workers: InstallPhaseEvent</title> |
| 4 <head> |
| 5 <link rel="help" href="https://w3c.github.io/ServiceWorker/#install-phas
e-event"> |
| 6 <script src="/resources/testharness.js"></script> |
| 7 <script src="/resources/testharnessreport.js"></script> |
| 8 |
| 9 <script src=/resources/WebIDLParser.js></script> |
| 10 <script src=/resources/idlharness.js></script> |
| 11 |
| 12 </head> |
| 13 <body> |
| 14 |
| 15 <script type=text/plain id="idl_0"> |
| 16 interface InstallPhaseEvent : Event { |
| 17 Promise<any> waitUntil(Promise<any> f); |
| 18 }; |
| 19 </pre> |
| 20 |
| 21 <!-- |
| 22 Service Workers have two [Lifecycle events][1], `[install][2]` and |
| 23 `[activate][3]`. Service Workers use the `[InstallPhaseEvent][4]` interface for |
| 24 `[activate][3]` event and the `[InstallEvent][5]` interface, which inherits |
| 25 from the `[InstallPhaseEvent][4]` interface, for `[install][2]` event. |
| 26 |
| 27 [1]: #lifecycle-events |
| 28 [2]: #install-event |
| 29 [3]: #activate-event |
| 30 [4]: #install-phase-event-interface |
| 31 [5]: #install-event-interface |
| 32 --> |
| 33 |
| 34 |
| 35 <script type=text/plain id="untested_idls"> |
| 36 interface Event {}; |
| 37 </pre> |
| 38 |
| 39 <script> |
| 40 var idl_array = new IdlArray(); |
| 41 idl_array.add_untested_idls(document.getElementById("untested_idls").tex
tContent); |
| 42 idl_array.add_idls(document.getElementById("idl_0").textContent); |
| 43 idl_array.add_objects({ |
| 44 InstallPhaseEvent: ["throw new Error ('No object defined for the Ins
tallPhaseEvent interface')"] |
| 45 }); |
| 46 idl_array.test(); |
| 47 </script> |
| 48 |
| 49 </body> |
| 50 </html> |
| 51 |
OLD | NEW |