| OLD | NEW | 
| (Empty) |  | 
 |   1 <!DOCTYPE html> | 
 |   2 <html> | 
 |   3 <title>Service Workers: FetchEvent</title> | 
 |   4     <head> | 
 |   5         <link rel="help" href="https://w3c.github.io/ServiceWorker/#fetch-event-
    section"> | 
 |   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 [Constructor] | 
 |  17 interface FetchEvent : Event { | 
 |  18   readonly attribute Request request; | 
 |  19   readonly attribute Client client; // The window issuing the request. | 
 |  20   readonly attribute Context context; | 
 |  21   readonly attribute boolean isReload; | 
 |  22  | 
 |  23   void respondWith(Promise<AbstractResponse> r); | 
 |  24   Promise<any> forwardTo(ScalarValueString url); | 
 |  25   Promise<any> default(); | 
 |  26 }; | 
 |  27  | 
 |  28 enum Context { | 
 |  29   "connect", | 
 |  30   "font", | 
 |  31   "img", | 
 |  32   "object", | 
 |  33   "script", | 
 |  34   "style", | 
 |  35   "worker", | 
 |  36   "popup", | 
 |  37   "child", | 
 |  38   "navigate" | 
 |  39 }; | 
 |  40 </pre> | 
 |  41  | 
 |  42 <!-- | 
 |  43 Service Workers use the `[FetchEvent][1]` interface for `[fetch][2]` event. | 
 |  44  | 
 |  45 [1]: #fetch-event-interface | 
 |  46 [2]: #fetch-event | 
 |  47 --> | 
 |  48  | 
 |  49  | 
 |  50     <script type=text/plain id="untested_idls"> | 
 |  51         interface Request {}; | 
 |  52         interface Client {}; | 
 |  53         interface AbstractResponse {}; | 
 |  54         interface ScalarValueString {}; | 
 |  55         interface Event {}; | 
 |  56     </pre> | 
 |  57  | 
 |  58     <script> | 
 |  59         var idl_array = new IdlArray(); | 
 |  60         idl_array.add_untested_idls(document.getElementById("untested_idls").tex
    tContent); | 
 |  61         idl_array.add_idls(document.getElementById("idl_0").textContent); | 
 |  62         idl_array.add_objects({ | 
 |  63             FetchEvent: ["throw new Error ('No object defined for the FetchEvent
     interface')"], | 
 |  64             Context: ["throw new Error ('No object defined for the Context enum'
    )"] | 
 |  65         }); | 
 |  66         idl_array.test(); | 
 |  67     </script> | 
 |  68  | 
 |  69     </body> | 
 |  70 </html> | 
 |  71  | 
| OLD | NEW |