Skip to content

Commit 685b79f

Browse files
committed
Backport c4d1ea1 to V1
1 parent c4d1ea1 commit 685b79f

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

docs/v1/index.bs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
19311931
* |registration|'s [=last update check time=] is not null and the time difference in seconds calculated by the current time minus |registration|’s [=last update check time=] is greater than 86400.
19321932
1. Let |response| be the result of <a lt="fetch">fetching</a> |request|.
19331933
1. If |response|’s <a for="response" href="https://github.com/whatwg/fetch/issues/376">cache state</a> is not "<code>local</code>", set |registration|’s [=service worker registration/last update check time=] to the current time.
1934-
1. [=Extract a MIME type=] from the |response|'s [=unsafe response=]'s [=response/header list=]. If this MIME type (ignoring parameters) is not one of <code>text/javascript</code>, <code>application/x-javascript</code>, and <code>application/javascript</code>, return a [=network error=].
1934+
1. [=Extract a MIME type=] from the |response|'s [=unsafe response=]'s [=response/header list=]. If this MIME type (ignoring parameters) is not a [=JavaScript MIME type=], return a [=network error=].
19351935
1. If |response|'s <a>unsafe response</a>'s [=response/type=] is not "<code>error</code>", and |response|'s [=response/status=] is an <a>ok status</a>, then:
19361936
1. [=map/Set=] <a>script resource map</a>[|request|'s [=request/url=]] to |response|.
19371937
1. Return |response|.
@@ -2233,9 +2233,9 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe
22332233

22342234
1. Set |request|'s [=request/redirect mode=] to "<code>error</code>".
22352235
1. [=/Fetch=] |request|, and asynchronously wait to run the remaining steps as part of fetch's <a>process response</a> for the [=/response=] |response|.
2236-
1. <a>Extract a MIME type</a> from the |response|'s [=response/header list=]. If this MIME type (ignoring parameters) is not one of <code>text/javascript</code>, <code>application/x-javascript</code>, and <code>application/javascript</code>, then:
2237-
1. Invoke <a>Reject Job Promise</a> with |job| and a "{{SecurityError}}" exception.
2238-
1. Asynchronously complete these steps with a <a>network error</a>.
2236+
1. [=Extract a MIME type=] from the |response|'s [=response/header list=]. If this MIME type (ignoring parameters) is not a [=JavaScript MIME type=], then:
2237+
1. Invoke [=Reject Job Promise=] with |job| and a "{{SecurityError}}" exception.
2238+
1. Asynchronously complete these steps with a [=network error=].
22392239
1. Let |serviceWorkerAllowed| be the result of [=extracting header list values=] given \`<code>Service-Worker-Allowed</code>\` and |response|'s [=response/header list=].
22402240

22412241
Note: See the definition of the Service-Worker-Allowed header in Appendix B: Extended HTTP headers.

docs/v1/index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@
11771177
}
11781178
}
11791179
</style>
1180-
<meta content="Bikeshed version b734e371910e25ac23b774dca3dea5cfc7b7fc0b" name="generator">
1180+
<meta content="Bikeshed version 81c00a31d8c468599cf8337dd150a8be9a2b4e5d" name="generator">
11811181
<link href="https://www.w3.org/TR/service-workers/" rel="canonical">
11821182
<style>/* style-md-lists */
11831183

@@ -1425,7 +1425,7 @@
14251425
<div class="head">
14261426
<p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2016/logos/W3C" width="72"> </a> </p>
14271427
<h1 class="p-name no-ref" id="title">Service Workers 1</h1>
1428-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2017-04-02">2 April 2017</time></span></h2>
1428+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2017-04-07">7 April 2017</time></span></h2>
14291429
<div data-fill-with="spec-metadata">
14301430
<dl>
14311431
<dt>This version:
@@ -4004,7 +4004,7 @@ <h4 class="heading settled" data-level="6.3.2" id="importscripts"><span class="s
40044004
<li data-md="">
40054005
<p>If <var>response</var>’s <a href="https://github.com/whatwg/fetch/issues/376">cache state</a> is not "<code>local</code>", set <var>registration</var>’s <a data-link-type="dfn" href="#dfn-last-update-check-time" id="ref-for-dfn-last-update-check-time-3">last update check time</a> to the current time.</p>
40064006
<li data-md="">
4007-
<p><a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-header-extract-mime-type">Extract a MIME type</a> from the <var>response</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#unsafe-response">unsafe response</a>'s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response-header-list">header list</a>. If this MIME type (ignoring parameters) is not one of <code>text/javascript</code>, <code>application/x-javascript</code>, and <code>application/javascript</code>, return a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-network-error">network error</a>.</p>
4007+
<p><a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-header-extract-mime-type">Extract a MIME type</a> from the <var>response</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#unsafe-response">unsafe response</a>'s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response-header-list">header list</a>. If this MIME type (ignoring parameters) is not a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type">JavaScript MIME type</a>, return a <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-network-error">network error</a>.</p>
40084008
<li data-md="">
40094009
<p>If <var>response</var>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#unsafe-response">unsafe response</a>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response-type">type</a> is not "<code>error</code>", and <var>response</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response-status">status</a> is an <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#ok-status">ok status</a>, then:</p>
40104010
<ol>
@@ -4401,7 +4401,7 @@ <h3 class="heading settled" id="update-algorithm"><span class="content"><dfn cla
44014401
<li data-md="">
44024402
<p><a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-fetch">Fetch</a> <var>request</var>, and asynchronously wait to run the remaining steps as part of fetch’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#process-response">process response</a> for the <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response">response</a> <var>response</var>.</p>
44034403
<li data-md="">
4404-
<p><a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-header-extract-mime-type">Extract a MIME type</a> from the <var>response</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response-header-list">header list</a>. If this MIME type (ignoring parameters) is not one of <code>text/javascript</code>, <code>application/x-javascript</code>, and <code>application/javascript</code>, then:</p>
4404+
<p><a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-header-extract-mime-type">Extract a MIME type</a> from the <var>response</var>’s <a data-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response-header-list">header list</a>. If this MIME type (ignoring parameters) is not a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type">JavaScript MIME type</a>, then:</p>
44054405
<ol>
44064406
<li data-md="">
44074407
<p>Invoke <a data-link-type="dfn" href="#reject-job-promise" id="ref-for-reject-job-promise-6">Reject Job Promise</a> with <var>job</var> and a "<code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#securityerror">SecurityError</a></code>" exception.</p>
@@ -6450,6 +6450,7 @@ <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span cla
64506450
<li><a href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">in parallel</a>
64516451
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#incumbent-settings-object">incumbent settings object</a>
64526452
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#fetching-scripts-is-top-level">is top-level</a>
6453+
<li><a href="https://html.spec.whatwg.org/multipage/scripting.html#javascript-mime-type">javascript mime type</a>
64536454
<li><a href="https://html.spec.whatwg.org/multipage/workers.html#kill-a-worker">kill a worker</a>
64546455
<li><a href="https://html.spec.whatwg.org/multipage/webappapis.html#list-of-active-timers">list of active timers</a>
64556456
<li><a href="https://html.spec.whatwg.org/multipage/indices.html#event-message">message</a>

0 commit comments

Comments
 (0)