|
129 | 129 | } |
130 | 130 | </style> |
131 | 131 | </head> |
132 | | - <body data-cite="ENCODING SERVICE-WORKERS"> |
| 132 | + <body data-cite="ENCODING"> |
133 | 133 | <section id='abstract'> |
134 | 134 | <p> |
135 | 135 | This specification defines a JSON-based manifest file that provides |
@@ -222,11 +222,6 @@ <h3> |
222 | 222 | "orientation": "landscape", |
223 | 223 | "theme_color": "aliceblue", |
224 | 224 | "background_color": "red", |
225 | | - "serviceworker": |
226 | | - "src": "sw.js", |
227 | | - "scope": "/racer/", |
228 | | - "update_via_cache": "none" |
229 | | - }, |
230 | 225 | "screenshots": [{ |
231 | 226 | "src": "screenshots/in-game-1x.jpg", |
232 | 227 | "sizes": "640x480", |
@@ -386,12 +381,6 @@ <h3> |
386 | 381 | <li>Let <var>manifest</var> be the manifest value created during <a> |
387 | 382 | steps to determine installability of the document</a>. |
388 | 383 | </li> |
389 | | - <li>If |manifest|.{{WebAppManifest/serviceworker}} is not |
390 | | - <code>undefined</code>, the user agent MAY run the <a>steps for |
391 | | - registering a manifest's service worker</a> with |
392 | | - |manifest|.{{WebAppManifest/serviceworker}}. If those steps return |
393 | | - failure, abort these steps. |
394 | | - </li> |
395 | 384 | <li>Perform an unspecified sequence of actions to attempt to register |
396 | 385 | the web application in the user's operating system (e.g., create |
397 | 386 | shortcuts that launch the web application, register the application |
@@ -1540,11 +1529,6 @@ <h3> |
1540 | 1529 | result of running <a>processing the <code>related_applications</code> |
1541 | 1530 | member</a> given <var>manifest</var>["<a>related_applications</a>"]. |
1542 | 1531 | </li> |
1543 | | - <li>Set <var>manifest</var>["<a>serviceworker</a>"] to the result of |
1544 | | - running <a>processing the <code>serviceworker</code> member</a> given |
1545 | | - <var>manifest</var>["<a>serviceworker</a>"], <var>manifest URL</var>, |
1546 | | - and <var>serviceworker</var>. |
1547 | | - </li> |
1548 | 1532 | <li>Set <var>manifest</var>["<a>shortcuts</a>"] to the result of |
1549 | 1533 | running <a>processing the <code>shortcuts</code> member</a> given |
1550 | 1534 | <var>manifest URL</var>, and <code>"shortcuts"</code>. |
@@ -1622,7 +1606,6 @@ <h2> |
1622 | 1606 | USVString theme_color; |
1623 | 1607 | USVString background_color; |
1624 | 1608 | USVString scope; |
1625 | | - ServiceWorkerRegistrationObject serviceworker; |
1626 | 1609 | sequence<ExternalApplicationResource> related_applications; |
1627 | 1610 | boolean prefer_related_applications = "false"; |
1628 | 1611 | sequence<ShortcutItem> shortcuts; |
@@ -2065,115 +2048,6 @@ <h3> |
2065 | 2048 | </p> |
2066 | 2049 | </section> |
2067 | 2050 | </section> |
2068 | | - <section> |
2069 | | - <h3> |
2070 | | - <code>serviceworker</code> member |
2071 | | - </h3> |
2072 | | - <p> |
2073 | | - The <dfn>serviceworker</dfn> member describes a service worker as |
2074 | | - defined in [[SERVICE-WORKERS-1]]. |
2075 | | - </p> |
2076 | | - <p> |
2077 | | - The <a>serviceworker</a> member represents an intented <a data-cite= |
2078 | | - "service-workers-1#service-worker-registration-concept">service |
2079 | | - worker registration</a> in form of a <dfn>registration object</dfn> |
2080 | | - </p> |
2081 | | - <p class="note"> |
2082 | | - Other service worker registrations can be done, for instance by a |
2083 | | - script; if these have different scopes they will be considered |
2084 | | - separate registrations. If they have the same scope and script URL, |
2085 | | - they coalesce. If they have different script URLs, last one wins. |
2086 | | - </p> |
2087 | | - <p> |
2088 | | - The steps for <dfn>processing the <code>serviceworker</code> |
2089 | | - member</dfn> are given by the following algorithm. The algorithm |
2090 | | - takes a <a>ServiceWorkerRegistrationObject</a> |
2091 | | - <var>registration</var>. This algorithm returns a |
2092 | | - <a>ServiceWorkerRegistrationObject</a> <var>registration</var>, which |
2093 | | - can be <code>undefined</code>. |
2094 | | - </p> |
2095 | | - <ol> |
2096 | | - <li>If <var>registration</var> is <code>undefined</code>, return |
2097 | | - <code>undefined</code>. |
2098 | | - </li> |
2099 | | - <li>Set <var>registration</var>["src"] to the result of running |
2100 | | - <a>processing the <code>src</code> member of a service worker</a> |
2101 | | - given <var>registration</var>["src"] and <var>manifest URL</var>. |
2102 | | - </li> |
2103 | | - <li>If the result of running <a>is origin potentially trustworthy</a> |
2104 | | - with the origin of <var>registration</var>["src"] is <code>Not |
2105 | | - Trusted</code>, <a>issue a developer warning</a>, abort these steps |
2106 | | - and return <code>undefined</code>. |
2107 | | - </li> |
2108 | | - <li>Set <var>registration</var>["scope"] to the result of running <a> |
2109 | | - processing the <code>scope</code> member of a service worker</a> |
2110 | | - given <var>registration</var>["scope"]. |
2111 | | - </li> |
2112 | | - <li>Return <var>registration</var>. |
2113 | | - </li> |
2114 | | - </ol> |
2115 | | - <div class="example"> |
2116 | | - In the following example, the web application is listing a service |
2117 | | - worker for the <code>/foo</code> scope, bypassing the user agent |
2118 | | - cache when fetching the <code>"sw.js"</code> source: |
2119 | | - <pre class="example js"> |
2120 | | - "serviceworker": { |
2121 | | - "src": "sw.js", |
2122 | | - "scope": "/foo", |
2123 | | - "update_via_cache": "none" |
2124 | | - } |
2125 | | - </pre> |
2126 | | - </div> |
2127 | | - <p> |
2128 | | - The <dfn>steps for registering a manifest's service worker</dfn> are |
2129 | | - given by the following algorithm, which takes a |
2130 | | - {{ServiceWorkerRegistrationObject}} <var>registration</var> and |
2131 | | - returns success or failure. |
2132 | | - </p> |
2133 | | - <ol> |
2134 | | - <li>Let <var>serviceWorker</var> be the {{ServiceWorkerContainer}} |
2135 | | - associated with the <a>top-level browsing context</a>. If there is |
2136 | | - none, return failure. |
2137 | | - </li> |
2138 | | - <li>Let <var>options</var> be the result of running the <a>steps for |
2139 | | - converting a service worker registration to an options dictionary</a> |
2140 | | - on <var>registration</var>. |
2141 | | - </li> |
2142 | | - <li>Let <var>promise</var> be the result of invoking |
2143 | | - |serviceWorker|.{{ServiceWorkerContainer/register()}} with arguments |
2144 | | - |registration|.{{ServiceWorkerRegistrationObject/src}} and |
2145 | | - <var>options</var>. |
2146 | | - </li> |
2147 | | - <li>Wait until <var>promise</var> settles. If the settled |
2148 | | - <var>promise</var> is rejected, return failure. |
2149 | | - </li> |
2150 | | - <li>Return success. |
2151 | | - </li> |
2152 | | - </ol> |
2153 | | - <p> |
2154 | | - The <dfn>steps for converting a service worker registration to an |
2155 | | - options dictionary</dfn> are given by the following algorithm. The |
2156 | | - algorithm takes a {{ServiceWorkerRegistrationObject}} |
2157 | | - <var>registration</var>, and returns a {{RegistrationOptions}} |
2158 | | - dictionary which is suitable to pass to |
2159 | | - {{ServiceWorkerContainer}}.{{ServiceWorkerContainer/register()}}. |
2160 | | - </p> |
2161 | | - <ol> |
2162 | | - <li>Create a new {{RegistrationOptions}} <var>options</var>. |
2163 | | - </li> |
2164 | | - <li>Set |options|.{{RegistrationOptions/scope}} to |
2165 | | - |registration|.{{ServiceWorkerRegistrationObject/scope}}. |
2166 | | - </li> |
2167 | | - <li>Set |options|.{{RegistrationOptions/type}} to |
2168 | | - |registration|.{{ServiceWorkerRegistrationObject/type}}. |
2169 | | - </li> |
2170 | | - <li>Set |options|.{{RegistrationOptions/updateViaCache}} to |
2171 | | - |registration|.{{ServiceWorkerRegistrationObject/update_via_cache}}. |
2172 | | - </li> |
2173 | | - <li>Return <var>options</var>. |
2174 | | - </li> |
2175 | | - </ol> |
2176 | | - </section> |
2177 | 2051 | <section> |
2178 | 2052 | <h3> |
2179 | 2053 | <code title="">theme_color</code> member |
@@ -3223,101 +3097,6 @@ <h3> |
3223 | 3097 | </p> |
3224 | 3098 | </section> |
3225 | 3099 | </section> |
3226 | | - <section> |
3227 | | - <h2> |
3228 | | - The ServiceWorkerRegistrationObject dictionary and its members |
3229 | | - </h2> |
3230 | | - <p> |
3231 | | - A <dfn>ServiceWorkerRegistrationObject</dfn> dictionary represents a |
3232 | | - service worker registration for the web application. |
3233 | | - </p> |
3234 | | - <pre class="idl"> |
3235 | | - dictionary ServiceWorkerRegistrationObject { |
3236 | | - required USVString src; |
3237 | | - USVString scope; |
3238 | | - WorkerType type = "classic"; |
3239 | | - ServiceWorkerUpdateViaCache update_via_cache = "imports"; |
3240 | | - }; |
3241 | | - </pre> |
3242 | | - <section data-dfn-for="ServiceWorkerRegistrationObject"> |
3243 | | - <h3> |
3244 | | - <code>src</code> member |
3245 | | - </h3> |
3246 | | - <p> |
3247 | | - The <dfn>src</dfn> member of a <a>ServiceWorkerRegistrationObject</a> |
3248 | | - dictionary is a <a>URL</a> representing a service worker. |
3249 | | - </p> |
3250 | | - <p> |
3251 | | - The steps for <dfn>processing the <code>src</code> member of a |
3252 | | - service worker</dfn> are given by the following algorithm. The |
3253 | | - algorithm takes a <a>USVString</a> <var>source URL</var>, and a |
3254 | | - <a>URL</a> <var>manifest URL</var>, which is the <a>URL</a> from |
3255 | | - which the <var>manifest</var> was fetched. This algorithm will return |
3256 | | - a <a>URL</a> or <code>undefined</code>. |
3257 | | - </p> |
3258 | | - <ol> |
3259 | | - <li>If <a>Type</a>(<var>source URL</var>) is not String or |
3260 | | - <var>source URL</var> is the empty <a>string</a>, then return <code> |
3261 | | - undefined</code>. |
3262 | | - </li> |
3263 | | - <li>Otherwise, <a>parse</a> <var>source URL</var> using <var>manifest |
3264 | | - URL</var> as the base URL and return the result. |
3265 | | - </li> |
3266 | | - </ol> |
3267 | | - </section> |
3268 | | - <section data-dfn-for="ServiceWorkerRegistrationObject" data-link-for= |
3269 | | - "ServiceWorkerRegistrationObject"> |
3270 | | - <h3> |
3271 | | - <dfn>scope</dfn> member |
3272 | | - </h3> |
3273 | | - <p> |
3274 | | - The <a>scope</a> member of a <a>ServiceWorkerRegistrationObject</a> |
3275 | | - dictionary is the service worker's associated <a data-cite= |
3276 | | - "service-workers-1#dfn-scope-url">scope URL</a>. |
3277 | | - </p> |
3278 | | - <p> |
3279 | | - The steps for <dfn>processing the <code>scope</code> member of a |
3280 | | - service worker</dfn> are given by the following algorithm. The |
3281 | | - algorithm takes a <a>USVString</a> <var>scope URL</var>, and a |
3282 | | - <a>URL</a> <var>manifest URL</var>, which is the <a>URL</a> from |
3283 | | - which the <var>manifest</var> was fetched. This algorithm will return |
3284 | | - a <a>URL</a> or <code>undefined</code>. |
3285 | | - </p> |
3286 | | - <ol> |
3287 | | - <li>If <var>scope URL</var> is <code>undefined</code>, return <code> |
3288 | | - undefined</code> |
3289 | | - </li> |
3290 | | - <li>Otherwise, <a>parse</a> <var>scope URL</var> using <var>manifest |
3291 | | - URL</var> as the base URL and return the result. |
3292 | | - </li> |
3293 | | - </ol> |
3294 | | - </section> |
3295 | | - <section data-dfn-for="ServiceWorkerRegistrationObject"> |
3296 | | - <h3> |
3297 | | - <code>type</code> member |
3298 | | - </h3> |
3299 | | - <p> |
3300 | | - The <dfn>type</dfn> member of a |
3301 | | - <a>ServiceWorkerRegistrationObject</a> dictionary is the service |
3302 | | - worker's {{WorkerType}}. The possible values are those of the |
3303 | | - {{WorkerType}} enum defined in [[HTML]]. |
3304 | | - </p> |
3305 | | - </section> |
3306 | | - <section data-dfn-for="ServiceWorkerRegistrationObject" data-link-for= |
3307 | | - "ServiceWorkerRegistrationObject"> |
3308 | | - <h3> |
3309 | | - <code>update_via_cache</code> member |
3310 | | - </h3> |
3311 | | - <p> |
3312 | | - The <dfn>update_via_cache</dfn> member of a |
3313 | | - <a>ServiceWorkerRegistrationObject</a> dictionary determines the |
3314 | | - <a data-cite="service-workers-1#dfn-update-via-cache">update via |
3315 | | - cache mode</a> for the service worker. The possible values are those |
3316 | | - of the {{ServiceWorkerUpdateViaCache}} enum defined in |
3317 | | - [[SERVICE-WORKERS-1]]. |
3318 | | - </p> |
3319 | | - </section> |
3320 | | - </section> |
3321 | 3100 | <section data-dfn-for="ExternalApplicationResource" data-link-for= |
3322 | 3101 | "ExternalApplicationResource"> |
3323 | 3102 | <h2> |
|
0 commit comments