Skip to content

Commit 8923ba4

Browse files
author
Marcos Cáceres
authored
BREAKING CHANGE: remove serviceworker member (#825)
1 parent 6708bc8 commit 8923ba4

File tree

1 file changed

+1
-222
lines changed

1 file changed

+1
-222
lines changed

index.html

+1-222
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
}
130130
</style>
131131
</head>
132-
<body data-cite="ENCODING SERVICE-WORKERS">
132+
<body data-cite="ENCODING">
133133
<section id='abstract'>
134134
<p>
135135
This specification defines a JSON-based manifest file that provides
@@ -222,11 +222,6 @@ <h3>
222222
"orientation": "landscape",
223223
"theme_color": "aliceblue",
224224
"background_color": "red",
225-
"serviceworker":
226-
"src": "sw.js",
227-
"scope": "/racer/",
228-
"update_via_cache": "none"
229-
},
230225
"screenshots": [{
231226
"src": "screenshots/in-game-1x.jpg",
232227
"sizes": "640x480",
@@ -386,12 +381,6 @@ <h3>
386381
<li>Let <var>manifest</var> be the manifest value created during <a>
387382
steps to determine installability of the document</a>.
388383
</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>
395384
<li>Perform an unspecified sequence of actions to attempt to register
396385
the web application in the user's operating system (e.g., create
397386
shortcuts that launch the web application, register the application
@@ -1540,11 +1529,6 @@ <h3>
15401529
result of running <a>processing the <code>related_applications</code>
15411530
member</a> given <var>manifest</var>["<a>related_applications</a>"].
15421531
</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>
15481532
<li>Set <var>manifest</var>["<a>shortcuts</a>"] to the result of
15491533
running <a>processing the <code>shortcuts</code> member</a> given
15501534
<var>manifest URL</var>, and <code>"shortcuts"</code>.
@@ -1622,7 +1606,6 @@ <h2>
16221606
USVString theme_color;
16231607
USVString background_color;
16241608
USVString scope;
1625-
ServiceWorkerRegistrationObject serviceworker;
16261609
sequence&lt;ExternalApplicationResource&gt; related_applications;
16271610
boolean prefer_related_applications = "false";
16281611
sequence&lt;ShortcutItem&gt; shortcuts;
@@ -2065,115 +2048,6 @@ <h3>
20652048
</p>
20662049
</section>
20672050
</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>
21772051
<section>
21782052
<h3>
21792053
<code title="">theme_color</code> member
@@ -3223,101 +3097,6 @@ <h3>
32233097
</p>
32243098
</section>
32253099
</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>
33213100
<section data-dfn-for="ExternalApplicationResource" data-link-for=
33223101
"ExternalApplicationResource">
33233102
<h2>

0 commit comments

Comments
 (0)