OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <title>Service Workers: scope</title> |
| 4 <head> |
| 5 <link rel="help" href="https://w3c.github.io/ServiceWorker/#service-work
er-scope"> |
| 6 <script src="/resources/testharness.js"></script> |
| 7 <script src="/resources/testharnessreport.js"></script> |
| 8 |
| 9 </head> |
| 10 <body> |
| 11 |
| 12 <!-- |
| 13 |
| 14 The `scope` of a `ServiceWorker` object reflects the [URL scope][1] of the |
| 15 associated Service Worker [registration][2]. The `scope` attribute must return |
| 16 the [serialization][3] of the URL representing the [URL scope][1] of the |
| 17 associated Service Worker [registration][2]. |
| 18 |
| 19 For example, consider a document created by a navigation to |
| 20 `https://example.com/app.html` which [matches][4] via the following |
| 21 registration call which has been previously executed: |
| 22 // Script on the page https://example.com/app.html |
| 23 navigator.serviceWorker.register("/service_worker.js", { scope: "/*" }); |
| 24 The value of `navigator.serviceWorker.controller.scope` will be |
| 25 `"https://example.com/*"`. |
| 26 |
| 27 |
| 28 |
| 29 [1]: #url-scope |
| 30 [2]: #registration |
| 31 [3]: http://url.spec.whatwg.org/#concept-url-serializer |
| 32 [4]: #on-fetch-request-algorithm |
| 33 |
| 34 --> |
| 35 |
| 36 |
| 37 |
| 38 <script> |
| 39 test(function() { |
| 40 // not_implemented(); |
| 41 }, "There are no tests for section scope so far."); |
| 42 </script> |
| 43 |
| 44 </body> |
| 45 </html> |
| 46 |
OLD | NEW |