@@ -14246,9 +14246,10 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
14246
14246
"<code data-x="">media</code>" <var>phase</var>:</p>
14247
14247
14248
14248
<ol>
14249
- <li><p>Let <var>linkHeaders</var> be the result of <span>getting a structured field value</span>
14250
- given `<code>Link</code>` and "<code data-x="">list</code>" from
14251
- <var>response</var>'s <span data-x="concept-response-header-list">header list</span>.</p></li>
14249
+ <li><p>Let <var>linkHeaders</var> be the result of <span
14250
+ data-x="concept-header-list-get-decode-split">getting, decoding, and splitting</span>
14251
+ `<code>Link</code>` from <var>response</var>'s
14252
+ <span data-x="concept-response-header-list">header list</span>.</p></li>
14252
14253
14253
14254
<li><p>If <var>linkHeaders</var> is null, then return.</p></li>
14254
14255
@@ -14257,14 +14258,13 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
14257
14258
<var>linkHeaders</var>, run these steps:</p>
14258
14259
14259
14260
<ol>
14260
- <li><p>Let (<var>href</var>, <var>params</var>) be the result of parsing
14261
- <var>linkHeader</var> according to the `<code data-x="http-link">Link</code>` header
14262
- Serialization rules. <ref spec=HTTP> <ref spec=WEBLINK></p></li>
14263
- <!-- WEBLINK is ref for Link: header -->
14261
+ <li><p>Let (<var>href</var>, <var>params</var>) be the result of
14262
+ <span data-x="parse a link header"> parsing</span> <var>linkHeader</var>.
14263
+ according to the `<code data-x="http-link">Link</code>` header
14264
14264
14265
14265
<li>
14266
- <p>If <var>params</var>["<code data-x="attr-link-rel">rel</code>"] is
14267
- "<code data-x="rel-preload">preload</code>", then abort these steps .</p>
14266
+ <p>If <var>params</var>["<code data-x="attr-link-rel">rel</code>"] is not
14267
+ "<code data-x="rel-preload">preload</code>", then <span>continue</span> .</p>
14268
14268
14269
14269
<p class=note>Additional support for link types can be added here in the future.</p>
14270
14270
</li>
@@ -14273,15 +14273,15 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
14273
14273
"<code data-x="attr-img-srcset">srcset</code>",
14274
14274
"<code data-x="attr-link-imagesrcset">imagesrcset</code>", or <code
14275
14275
data-x="attr-link-media">media</code>" <span data-x="map exists">exist</span> in
14276
- <var>params</var>; Otherwise false.</p></li>
14276
+ <var>params</var>; otherwise false.</p></li>
14277
14277
14278
- <li><p>If <var>expectedPhase</var> is not <var>phase</var>, then abort these
14279
- steps .</p></li>
14278
+ <li><p>If <var>expectedPhase</var> is not <var>phase</var>, then
14279
+ <span>continue</span> .</p></li>
14280
14280
14281
14281
<li><p>If <var>params</var> includes "<code data-x="attr-link-media">media</code>" and
14282
14282
<var>params</var>["<code data-x="attr-link-media">media</code>"] does not
14283
- <span data-x="matches the environment">match the environment</span>, then abort these
14284
- steps .</p></li>
14283
+ <span data-x="matches the environment">match the environment</span>, then
14284
+ <span>continue</span> .</p></li>
14285
14285
14286
14286
<li><p>Let <var>element</var> be the result of
14287
14287
<span data-x="create an element">creating an element</span> given <var>document</var>,
@@ -14292,23 +14292,103 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
14292
14292
"<code data-x="attr-img-srcset">rel</code>", "<code data-x="attr-link-type">type</code>",
14293
14293
"<code data-x="attr-link-crossorigin">crossorigin</code>",
14294
14294
"<code data-x="attr-link-imagesizes">imagesizes</code>",
14295
+ "<code data-x="attr-link-blocking">blocking</code>",
14296
+ "<code data-x="attr-link-rev">rev</code>",
14297
+ "<code data-x="attr-link-integrity">integrity</code>",
14295
14298
"<code data-x="attr-link-imagesrcset">imagesrcset</code>", or
14296
- "<code data-x="attr-link-media">media</code>", then <span data-x="list append">append</span>
14297
- <var>entry</var> to <var>element</var>'s <span>attribute list</span>.</p></li>
14299
+ "<code data-x="attr-link-media">media</code>", then
14300
+ <span data-x="concept-element-attributes-set-value">set an attribute value</span> for
14301
+ <var>element</var> using <var>entry</var>[0] and <var>entry</var>[1].</p></li>
14302
+
14303
+ <li><p><span data-x="concept-element-attributes-set-value">Set an attribute value</span> for
14304
+ <var>element</var> using "<code data-x="attr-link-href">href</code>" and
14305
+ <var>href</var>.</p></li>
14298
14306
14299
14307
<li><p><span data-x="fetch and process the linked resource">Fetch and process</span>
14300
14308
<var>el</var>.</p></li>
14301
14309
</ol>
14302
14310
</li>
14303
14311
</ol>
14304
14312
14305
- <p class="XXX">The processing of additional `<code data-x="http-link">Link</code>` headers, in
14306
- particular their influence on a <code>Document</code>'s
14307
- <span>script-blocking style sheet counter</span>, is not defined. See
14313
+ <p class="XXX">The processing of `<code data-x="http-link">Link</code>` headers apart from
14314
+ <code data-x="rel-preload">preload</code>, in particular their influence on a
14315
+ <code>Document</code>'s < span>script-blocking style sheet counter</span>, is not defined. See
14308
14316
<a href="https://github.com/whatwg/html/issues/4224">issue #4224</a> for
14309
14317
discussion on integrating this into the spec.</p>
14310
14318
14311
- </div>
14319
+ <p>To <dfn>parse a link header</dfn> given a <span>string</span> <var>input<var>, do the
14320
+ following, as specified in Web Linking: <ref spec=WEBLINK></p>
14321
+
14322
+ <ol>
14323
+ <li><p>Let <var>position</var> point at the first code point of <var>input</var>.</p></li>
14324
+
14325
+ <li><p><span>Skip ASCII whitespace</span> within <var>input</var> given
14326
+ <var>position</var>.</p></li>
14327
+
14328
+ <li><p>If <var>input</var>[<var>position</var>] is an U+003C LESS-THAN SIGN (<),
14329
+ then advance <var>position</var> by 1; otherwise return null.</p></li>
14330
+
14331
+ <li><p><span>Skip ASCII whitespace</span> within <var>input</var> given
14332
+ <var>position</var>.</p></li>
14333
+
14334
+ <li><p><span>Collect a sequence of code points</span> that are not an U+003E GREATER-THAN SIGN
14335
+ (>) from <var>input</var> given <var>position</var>, and let <var>href</var> be the
14336
+ result.</p></li>
14337
+
14338
+ <li><p>If <var>position</var> is at the end of <var>input, return null; otherwise advance
14339
+ <var>position</var> by 1.</p></li>
14340
+
14341
+ <li><p>Let <var>href</var> be the result of <span data-x="strip leading and trailing ASCII
14342
+ whitespace">stripping leading and trailing ASCII whitespace</span> <var>href</var>.</p></li>
14343
+
14344
+ <li><p>If <var>href</var> is an empty string, return null.</p></li>
14345
+
14346
+ <li><p>Advance <var>position</var> to <var>gtSigns</var>[0] + 1.</p></li>
14347
+
14348
+ <li><p>Let <var>params</var> be a new <span data-x="ordered map">map</span>.</p></li>
14349
+
14350
+ <li>
14351
+ <p>While <var>position</var> is not past the end of <var>input</var>:<p>
14352
+
14353
+ <ol>
14354
+ <li><p><span>Skip ASCII whitespace</span> within <var>input</var> given
14355
+ <var>position</var>.</p></li>
14356
+
14357
+ <li><p>If <var>input</var>[<var>position</var>] is an U+003B SEMICOLON (;), then advance
14358
+ <var>position</var> by 1; otherwise return null.</p></li>
14359
+
14360
+ <li><p><span>Skip ASCII whitespace</span> within <var>input</var> given
14361
+ <var>position</var>.</p></li>
14362
+
14363
+ <li><p>If <var>position</var> is past the end of <var>input</var>, then return null.</p></li>
14364
+
14365
+
14366
+ </ol>
14367
+ </li>
14368
+
14369
+ <li><p><span data-x="list iterate">For each</span> token returned by
14370
+ <span data-x="strictly split">strictly splitting</span> <var> on the U+003B SEMICOLON character (;)
14371
+
14372
+ <li><p>Let <var>paramsString</var> be the result of
14373
+ <span data-x="strip leading and trailing ASCII
14374
+ whitespace">stripping leading and trailing ASCII whitespace</span> from
14375
+ the substring of <var>trimmedHeader</var> between <var>gtSigns</var>[0] and
14376
+ <var>trimmedHeader</var>'s length.</p></li>
14377
+
14378
+ <li><p>If <var>paramsString</var>[0] is not U+003B SEMICOLON (;), return null.
14379
+
14380
+
14381
+
14382
+
14383
+ <li><p>Return (<var>href</var>, <var>params</var>).</p></li>
14384
+
14385
+ </ol>
14386
+
14387
+ <code>Document</code> <var>doc</var>,
14388
+ <span data-x="concept-response">response</span>, and a "<code data-x="">pre-media</code>" or
14389
+ "<code data-x="">media</code>" <var>phase</var>:</p>
14390
+
14391
+ </div>
14312
14392
14313
14393
<h5>Providing users with a means to follow hyperlinks created using the <code>link</code>
14314
14394
element</h5>
@@ -88832,7 +88912,7 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
88832
88912
data-x="navigation-params-response">response</span>'s <span
88833
88913
data-x="concept-response-service-worker-timing-info">service worker timing info</span>.</p></li>
88834
88914
88835
- <li>
88915
+ <li>
88836
88916
<p>If <var>navigationParams</var>'s <span data-x="navigation-params-response">response</span>
88837
88917
has a `<code>Refresh</code>` header, then:</p>
88838
88918
@@ -89076,7 +89156,7 @@ new PaymentRequest(…); // Allowed to use
89076
89156
<span>networking task source</span> places on the <span>task queue</span> while fetching runs
89077
89157
must <li><p><span>process link headers</span> given <var>document</var>,
89078
89158
<var>navigationParams</var>'s <span data-x="navigation-params-response">response</span>, and
89079
- "<code data-x="">media</code>".</p>
89159
+ "<code data-x="">media</code>", after it has been procesed by the <span>HTML parser</span> .</p>
89080
89160
89081
89161
<p class="note">The <span>input byte stream</span> converts bytes into characters for use in the
89082
89162
<span data-x="tokenization">tokenizer</span>. This process relies, in part, on character encoding
@@ -89110,6 +89190,12 @@ new PaymentRequest(…); // Allowed to use
89110
89190
<var>navigationParams</var>. They must also create a corresponding <span>XML parser</span>.
89111
89191
<ref spec=XML> <ref spec=XMLNS> <ref spec=RFC7303> <ref spec=DOM></p>
89112
89192
89193
+ <p>The first <span data-x="concept-task">task</span> that the
89194
+ <span>networking task source</span> places on the <span>task queue</span> while fetching runs
89195
+ must <li><p><span>process link headers</span> given <var>document</var>,
89196
+ <var>navigationParams</var>'s <span data-x="navigation-params-response">response</span>, and
89197
+ "<code data-x="">media</code>", after it has been procesed by the <span>XML parser</span>.</p>
89198
+
89113
89199
<p class="note">At the time of writing, the XML specification community had not actually yet
89114
89200
specified how XML and the DOM interact.</p> <!--XMLPARSE-->
89115
89201
0 commit comments