OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <title>Service Workers: event.default()</title> |
| 4 <head> |
| 5 <link rel="help" href="https://w3c.github.io/ServiceWorker/#default-meth
od"> |
| 6 <script src="/resources/testharness.js"></script> |
| 7 <script src="/resources/testharnessreport.js"></script> |
| 8 |
| 9 </head> |
| 10 <body> |
| 11 |
| 12 <!-- |
| 13 |
| 14 `event.default()` method must run these steps: |
| 15 |
| 16 1. Let `promise` be a newly-created [promise][1]. |
| 17 2. Return `promise.` |
| 18 3. Run the following steps asynchronously: |
| 19 1. Let `request` be `event`'s `request`. |
| 20 2. Set `request`'s [skip service worker flag][2]. |
| 21 3. Let `response` be the result of running [fetch algorithm][3] with |
| 22 `request` as its argument. |
| 23 4. If `response` is a [network error][4], then: |
| 24 1. Reject `promise` with a new [DOMException][5] whose name is |
| 25 "[NetworkError][6]". |
| 26 5. Else, |
| 27 1. Resolve `promise` with a new [Response][7] object associated |
| 28 with `response`. |
| 29 |
| 30 |
| 31 |
| 32 [1]: http://goo.gl/3TobQS |
| 33 [2]: http://goo.gl/gP7IWW |
| 34 [3]: http://goo.gl/fGMifs |
| 35 [4]: http://goo.gl/jprjjc |
| 36 [5]: http://goo.gl/A0U8qC |
| 37 [6]: http://goo.gl/lud5HB |
| 38 [7]: http://goo.gl/Deazjv |
| 39 |
| 40 --> |
| 41 |
| 42 |
| 43 |
| 44 <script> |
| 45 test(function() { |
| 46 // not_implemented(); |
| 47 }, "There are no tests for section event.default() so far."); |
| 48 </script> |
| 49 |
| 50 </body> |
| 51 </html> |
| 52 |
OLD | NEW |