Skip to content

Commit ef69382

Browse files
authored
Merge pull request #1002 from domenic/more-safe-link-fixup
Editorial: more link-defaults and anchors cleanup
2 parents 58be22d + c5fae3b commit ef69382

File tree

2 files changed

+33
-111
lines changed

2 files changed

+33
-111
lines changed

docs/index.bs

Lines changed: 12 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ Markup Shorthands: css no
2323

2424
<pre class=biblio>
2525
{
26-
"promises-guide": {
27-
"href": "https://www.w3.org/2001/tag/doc/promises-guide",
28-
"title": "Writing Promise-Using Specifications",
29-
"date": "24 July 2015",
30-
"status": "Finding of the W3C TAG",
31-
"publisher": "W3C TAG"
32-
},
3326
"unsanctioned-tracking": {
3427
"href": "https://www.w3.org/2001/tag/doc/unsanctioned-tracking/",
3528
"title": "Unsanctioned Web Tracking",
@@ -41,13 +34,15 @@ Markup Shorthands: css no
4134
</pre>
4235

4336
<pre class=link-defaults>
44-
spec: dom; type: interface; text: Document
45-
spec: html; type: element; text: link
46-
spec: url; type: dfn; text: is local
37+
spec: dom;
38+
type: interface; text: Document
39+
spec: html;
40+
type: element; text: link
41+
type: dfn; text: task queues; for: /
4742
</pre>
4843

4944
<pre class=anchors>
50-
spec: dom-ls; urlPrefix: https://dom.spec.whatwg.org/
45+
spec: DOM; urlPrefix: https://dom.spec.whatwg.org/
5146
type: dfn; text: ASCII case-insensitive; url: ascii-case-insensitive
5247

5348
spec: ecma-262; urlPrefix: http://tc39.github.io/ecma262/
@@ -67,29 +62,20 @@ spec: csp2; urlPrefix: https://w3c.github.io/webappsec-csp/2/
6762

6863
spec: fetch; urlPrefix: https://fetch.spec.whatwg.org/
6964
type: dfn
70-
text: basic filtered response; url: concept-filtered-response-basic
7165
text: cancel a ReadableStream; url: concept-cancel-readablestream
7266
text: close ReadableStream; url: concept-close-readablestream
7367
text: construct a ReadableStream; url: concept-construct-readablestream
74-
text: CORS filtered response; url: concept-filtered-response-cors
7568
text: disturbed; url: concept-body-disturbed
7669
text: empty; url: concept-empty-readablestream
7770
text: enqueue a chunk to ReadableStream; url: concept-enqueue-readablestream
7871
text: error ReadableStream; url: concept-error-readablestream
7972
text: errored; url: concept-readablestream-errored
80-
text: extract a mime type; url: concept-header-extract-mime-type
8173
text: fetch; url: concept-fetch
82-
text: filtered response; url: concept-filtered-response
8374
text: get a reader; url: concept-get-reader
84-
text: header; url: concept-header
8575
text: http fetch; url: concept-http-fetch
8676
text: HTTPS state value; url: concept-https-state-value
8777
text: internal response; url: concept-internal-response
8878
text: locked; url: concept-body-locked
89-
text: navigation request
90-
text: network error; url: concept-network-error
91-
text: non-subresource request
92-
text: ok status; url: ok-status
9379
text: opaque filtered response; url: concept-filtered-response-opaque
9480
text: opaque-redirect filtered response; url: concept-filtered-response-opaque-redirect
9581
text: potential-navigation-or-subresource request
@@ -102,8 +88,6 @@ spec: fetch; urlPrefix: https://fetch.spec.whatwg.org/
10288
text: response; for: fetch; url: concept-response
10389
text: skip service worker flag
10490
text: stream; url: concept-body-stream
105-
text: subresource request
106-
text: synchronous flag
10791
text: terminate; url: concept-fetch-terminate
10892
text: guard; for: headers; url: concept-headers-guard
10993
for: Body; urlPrefix: #concept-body-
@@ -112,68 +96,16 @@ spec: fetch; urlPrefix: https://fetch.spec.whatwg.org/
11296
text: name
11397
text: parsing; url: parse
11498
for: request; urlPrefix: #concept-request-
115-
text: cache mode
116-
text: client
117-
text: destination
118-
text: header list
119-
text: initiator
120-
text: method
121-
text: origin
122-
text: redirect mode
12399
text: request
124-
text: reserved client
125-
text: response tainting
126-
text: target client id
127-
text: url
100+
text: origin
128101
for: response; urlPrefix: #concept-response-
129-
text: body
130-
text: cache state
131-
text: CORS-exposed header-name list
132-
text: header list
133-
text: https state
134102
text: response
135-
text: status
136-
text: termination reason
137-
text: type
138-
type: interface
139-
text: Headers
140-
text: Request
141-
text: RequestInfo
142-
text: Response
143-
type: attribute; for: Request
144-
text: headers; url: dom-request-headers
145-
type: method
146-
text: get(name); for: Headers; url: dom-headers-get
147-
text: fetch(input, init); for: GlobalFetch; url: dom-global-fetch
148103

149104
spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/
150105
type: dfn
151106
urlPrefix: browsers.html
152107
text: ancestor origins array; for: Location; url: concept-location-ancestor-origins-array
153108
text: origin; for: resource; url: origin-2
154-
urlPrefix: infrastructure.html
155-
text: inserted into a document; url: insert-an-element-into-a-document
156-
urlPrefix: interaction.html
157-
text: has focus steps
158-
urlPrefix: semantics.html
159-
text: external resource link
160-
urlPrefix: webappapis.html
161-
text: dom manipulation task source
162-
text: environment
163-
text: run a classic script
164-
text: run a module script
165-
text: task queue; for: event loop
166-
for: environment; urlPrefix: #concept-environment-
167-
text: active service worker
168-
text: creation URL
169-
text: id
170-
urlPrefix: workers.html
171-
text: shared workers
172-
text: web worker; url: workers
173-
type: event
174-
urlPrefix: indices.html
175-
text: DOMContentLoaded; for: Document; url: event-domcontentloaded
176-
text: message; for: Window; url: event-message
177109

178110
spec: page-visibility; urlPrefix: https://www.w3.org/TR/page-visibility/
179111
type: enum; text: VisibilityState; url: VisibilityState
@@ -186,11 +118,6 @@ spec: secure-contexts; urlPrefix: https://w3c.github.io/webappsec-secure-context
186118
text: risks associated with insecure contexts; url: threat-risks
187119
text: secure context
188120

189-
spec: promises-guide; urlPrefix: https://www.w3.org/2001/tag/doc/promises-guide#
190-
type: dfn
191-
text: waiting for all
192-
text: transforming; url: transforming-by
193-
194121
spec: quota-api; urlPrefix: http://www.w3.org/TR/quota-api/
195122
type: attribute; for: ServiceWorkerGlobalScope
196123
text: onbeforeevicted; url: widl-ServiceWorkerGlobalScope-onbeforeevicted
@@ -273,7 +200,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
273200
<p>A <a href="#dfn-service-worker-registration">service worker registration</a> has an associated <dfn export id="dfn-active-worker">active worker</dfn> (a <a href="#dfn-service-worker">service worker</a> or null) whose <a href="#dfn-state">state</a> is either <em>activating</em> or <em>activated</em>. It is initially set to null.</p>
274201
<p>A <a href="#dfn-service-worker-registration">service worker registration</a> has an associated <dfn id="dfn-last-update-check-time">last update check time</dfn>. It is initially set to null.</p>
275202
<p>A <a href="#dfn-service-worker-registration">service worker registration</a> has an associated <dfn id="dfn-uninstalling-flag">uninstalling flag</dfn>. It is initially unset.</p>
276-
<p>A <a href="#dfn-service-worker-registration">service worker registration</a> has one or more <dfn id="dfn-service-worker-registration-task-queue" for="service worker registration">task queues</dfn> that back up the <a>tasks</a> from its <a href="#dfn-active-worker">active worker</a>'s <a>event loop</a>'s corresponding <a for="event loop">task queues</a>. (The target task sources for this back up operation are the <a href="#dfn-handle-fetch-task-source">handle fetch task source</a> and the <a href="#dfn-handle-functional-event-task-source">handle functional event task source</a>.) The user agent dumps the <a href="#dfn-active-worker">active worker</a>'s <a>tasks</a> to the <a href="#dfn-service-worker-registration">service worker registration</a>'s <a for="service worker registration">task queues</a> when the <a href="#dfn-active-worker">active worker</a> is <a href="#terminate-service-worker-algorithm">terminated</a> and <a lt="queue a task">re-queues those tasks</a> to the <a href="#dfn-active-worker">active worker</a>'s <a>event loop</a>'s corresponding <a for="event loop">task queues</a> when the <a href="#dfn-active-worker">active worker</a> spins off. Unlike the <a for="event loop">task queues</a> owned by <a>event loops</a>, the <a href="#dfn-service-worker-registration">service worker registration</a>'s <a for="service worker registration">task queues</a> are not processed by any <a>event loops</a> in and of itself.</p>
203+
<p>A <a href="#dfn-service-worker-registration">service worker registration</a> has one or more <dfn id="dfn-service-worker-registration-task-queue" for="service worker registration">task queues</dfn> that back up the <a>tasks</a> from its <a href="#dfn-active-worker">active worker</a>'s <a>event loop</a>'s corresponding <a for="/">task queues</a>. (The target task sources for this back up operation are the <a href="#dfn-handle-fetch-task-source">handle fetch task source</a> and the <a href="#dfn-handle-functional-event-task-source">handle functional event task source</a>.) The user agent dumps the <a href="#dfn-active-worker">active worker</a>'s <a>tasks</a> to the <a href="#dfn-service-worker-registration">service worker registration</a>'s <a for="service worker registration">task queues</a> when the <a href="#dfn-active-worker">active worker</a> is <a href="#terminate-service-worker-algorithm">terminated</a> and <a lt="queue a task">re-queues those tasks</a> to the <a href="#dfn-active-worker">active worker</a>'s <a>event loop</a>'s corresponding <a for="/">task queues</a> when the <a href="#dfn-active-worker">active worker</a> spins off. Unlike the <a for="/">task queues</a> owned by <a>event loops</a>, the <a href="#dfn-service-worker-registration">service worker registration</a>'s <a for="service worker registration">task queues</a> are not processed by any <a>event loops</a> in and of itself.</p>
277204

278205
<section>
279206
<h4 id="service-worker-registration-lifetime">Lifetime</h4>
@@ -1998,12 +1925,12 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
19981925
<tr>
19991926
<td><dfn event id="service-worker-global-scope-fetch-event"><code>fetch</code></dfn></td>
20001927
<td>{{FetchEvent}}</td>
2001-
<td>[<a href="#dfn-functional-events">Functional event</a>] The <a>http fetch</a> invokes <a href="#on-fetch-request-algorithm">Handle Fetch</a> with <var>request</var>. As a result of performing <a href="#on-fetch-request-algorithm">Handle Fetch</a>, the <a href="#dfn-service-worker-global-scope-service-worker">service worker</a> returns a <a for="fetch">response</a> to the <a>http fetch</a>. The <a for="fetch">response</a>, represented by a {{Response}} object, can be retrieved from a {{Cache}} object or directly from network using {{GlobalFetch/fetch(input, init)|self.fetch(input, init)}} method. (A custom {{Response}} object can be another option.)</td>
1928+
<td>[<a href="#dfn-functional-events">Functional event</a>] The <a>http fetch</a> invokes <a href="#on-fetch-request-algorithm">Handle Fetch</a> with <var>request</var>. As a result of performing <a href="#on-fetch-request-algorithm">Handle Fetch</a>, the <a href="#dfn-service-worker-global-scope-service-worker">service worker</a> returns a <a for="fetch">response</a> to the <a>http fetch</a>. The <a for="fetch">response</a>, represented by a {{Response}} object, can be retrieved from a {{Cache}} object or directly from network using {{WindowOrWorkerGlobalScope/fetch(input, init)|self.fetch(input, init)}} method. (A custom {{Response}} object can be another option.)</td>
20021929
</tr>
20031930
<tr>
20041931
<td><dfn event id="service-worker-global-scope-foreignfetch-event"><code>foreignfetch</code></dfn></td>
20051932
<td>{{FetchEvent}}</td>
2006-
<td>[<a href="#dfn-functional-events">Functional event</a>] The <a>http fetch</a> invokes [[#on-foreign-fetch-request-algorithm]] with <var>request</var>. As a result of performing [[#on-foreign-fetch-request-algorithm]], the <a for="ServiceWorkerGlobalScope">service worker</a> returns a <a for="fetch">response</a> to the <a>http fetch</a>. The <a for="fetch">response</a>, represented by a {{Response}} object, can be retrieved from a {{Cache}} object or directly from network using {{GlobalFetch/fetch(input, init)|self.fetch(input, init)}} method. (A custom {{Response}} object can be another option.)</td>
1933+
<td>[<a href="#dfn-functional-events">Functional event</a>] The <a>http fetch</a> invokes [[#on-foreign-fetch-request-algorithm]] with <var>request</var>. As a result of performing [[#on-foreign-fetch-request-algorithm]], the <a for="ServiceWorkerGlobalScope">service worker</a> returns a <a for="fetch">response</a> to the <a>http fetch</a>. The <a for="fetch">response</a>, represented by a {{Response}} object, can be retrieved from a {{Cache}} object or directly from network using {{WindowOrWorkerGlobalScope/fetch(input, init)|self.fetch(input, init)}} method. (A custom {{Response}} object can be another option.)</td>
20071934
</tr>
20081935
<tr>
20091936
<td><dfn event id="service-worker-global-scope-message-event"><code>message</code></dfn></td>
@@ -3449,7 +3376,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
34493376
<li>Set <var>workerGlobalScope</var>'s <a for="WorkerGlobalScope">referrer policy</a> to <var>serviceWorker</var>'s <a>script resource</a>'s <a href="#dfn-referrer-policy">referrer policy</a>.</li>
34503377
<li>Set <var>workerGlobalScope</var>'s <a for="WorkerGlobalScope">type</a> to <var>serviceWorker</var>'s <a href="#dfn-type">type</a>.</li>
34513378
<li>Create a new {{WorkerLocation}} object and associate it with <var>workerGlobalScope</var>.</li>
3452-
<li>If <var>serviceWorker</var> is an <a href="#dfn-active-worker">active worker</a>, and there are any <a>tasks</a> queued in <var>serviceWorker</var>'s <a href="#dfn-containing-service-worker-registration">containing service worker registration</a>'s <a for="service worker registration">task queues</a>, <a lt="queue a task">queue</a> them to <var>serviceWorker</var>'s <a>event loop</a>'s <a for="event loop">task queues</a> in the same order using their original <a>task sources</a>.</li>
3379+
<li>If <var>serviceWorker</var> is an <a href="#dfn-active-worker">active worker</a>, and there are any <a>tasks</a> queued in <var>serviceWorker</var>'s <a href="#dfn-containing-service-worker-registration">containing service worker registration</a>'s <a for="service worker registration">task queues</a>, <a lt="queue a task">queue</a> them to <var>serviceWorker</var>'s <a>event loop</a>'s <a for="/">task queues</a> in the same order using their original <a>task sources</a>.</li>
34533380
<li>If <var>script</var> is a <a>classic script</a>, then <a lt="run a classic script">run the classic script</a> <var>script</var>. Otherwise, it is a <a>module script</a>; <a lt="run a module script">run the module script</a> <var>script</var>.
34543381
<p class="note">In addition to the usual possibilities of returning a value or failing due to an exception, this could be prematurely aborted by the <a>kill a worker</a> or <a>terminate a worker</a> algorithms.</p>
34553382
</li>
@@ -3479,7 +3406,7 @@ spec: rfc7231; urlPrefix: https://tools.ietf.org/html/rfc7231
34793406
<li>If <var>serviceWorker</var> is not running, abort these steps.</li>
34803407
<li>Let <var>serviceWorkerGlobalScope</var> be <var>serviceWorker</var>'s <a>environment settings object</a>'s <a for="environment settings object">global object</a>.</li>
34813408
<li>Set <var>serviceWorkerGlobalScope</var>'s closing flag to true.</li>
3482-
<li>If there are any <a>tasks</a>, whose <a>task source</a> is either the <a href="#dfn-handle-fetch-task-source">handle fetch task source</a> or the <a href="#dfn-handle-functional-event-task-source">handle functional event task source</a>, queued in <var>serviceWorkerGlobalScope</var>'s <a>event loop</a>'s <a for="event loop">task queues</a>, <a lt="queue a task">queue</a> them to <var>serviceWorker</var>'s <a href="#dfn-containing-service-worker-registration">containing service worker registration</a>'s corresponding <a for="service worker registration">task queues</a> in the same order using their original <a>task sources</a>, and discard all the <a>tasks</a> (including <a>tasks</a> whose <a>task source</a> is neither the <a href="#dfn-handle-fetch-task-source">handle fetch task source</a> nor the <a href="#dfn-handle-functional-event-task-source">handle functional event task source</a>) from <var>serviceWorkerGlobalScope</var>'s <a>event loop</a>'s <a for="event loop">task queues</a> without processing them.
3409+
<li>If there are any <a>tasks</a>, whose <a>task source</a> is either the <a href="#dfn-handle-fetch-task-source">handle fetch task source</a> or the <a href="#dfn-handle-functional-event-task-source">handle functional event task source</a>, queued in <var>serviceWorkerGlobalScope</var>'s <a>event loop</a>'s <a for="/">task queues</a>, <a lt="queue a task">queue</a> them to <var>serviceWorker</var>'s <a href="#dfn-containing-service-worker-registration">containing service worker registration</a>'s corresponding <a for="service worker registration">task queues</a> in the same order using their original <a>task sources</a>, and discard all the <a>tasks</a> (including <a>tasks</a> whose <a>task source</a> is neither the <a href="#dfn-handle-fetch-task-source">handle fetch task source</a> nor the <a href="#dfn-handle-functional-event-task-source">handle functional event task source</a>) from <var>serviceWorkerGlobalScope</var>'s <a>event loop</a>'s <a for="/">task queues</a> without processing them.
34833410
<p class="note">This effectively means that the fetch events and the other functional events such as push events are backed up by the registration's task queues while the other tasks including message events are discarded.</p>
34843411
</li>
34853412
<li>Abort the script currently running in <var>serviceWorker</var>.</li>

0 commit comments

Comments
 (0)