Skip to content

Commit 9c7da49

Browse files
committed
Make <link>'s as="" attribute case-insensitive
Closes whatwg#1665 by aligning with other enumerated attributes.
1 parent 4fbd00f commit 9c7da49

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

source

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6910,13 +6910,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
69106910
data-x="idl-USVString">USVString</code> attribute but doesn't fall into any of the above
69116911
categories, then the getting and setting must be done in a transparent, case-preserving manner.</p>
69126912

6913-
<p>If a reflecting IDL attribute is an <span>IDL enumeration</span> attribute, then, on getting,
6914-
if the corresponding content attribute's value <span
6915-
data-x="case-sensitive">case-sensitively</span> matches one of the enumerated values, then the IDL
6916-
attribute must return the content attribute's value; otherwise it must return the content
6917-
attribute's default value. On setting, the content attribute must be set to the specified new
6918-
value.</p>
6919-
69206913
<p>If a reflecting IDL attribute is a <code data-x="idl-boolean">boolean</code> attribute, then on
69216914
getting the IDL attribute must return true if the content attribute is set, and false if it is
69226915
absent. On setting, the content attribute must be removed if the IDL attribute is set to false,
@@ -12848,7 +12841,7 @@ interface <dfn>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
1284812841
[<span>CEReactions</span>] attribute USVString <span data-x="dom-link-href">href</span>;
1284912842
[<span>CEReactions</span>] attribute DOMString? <span data-x="dom-link-crossOrigin">crossOrigin</span>;
1285012843
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-link-rel">rel</span>;
12851-
[<span>CEReactions</span>] attribute <span>RequestDestination</span> <span data-x="dom-link-as">as</span>; // (default "")
12844+
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-link-as">as</span>; // (default "")
1285212845
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-link-relList">relList</span>;
1285312846
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-link-media">media</span>;
1285412847
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-link-nonce">nonce</span>;
@@ -13043,11 +13036,13 @@ interface <dfn>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
1304313036

1304413037
<p>The <dfn><code data-x="attr-link-as">as</code></dfn> attribute specifies the <span
1304513038
data-x="concept-request-destination">destination</span> for a preload request for the resource
13046-
given by the <code data-x="attr-link-href">href</code> attribute. If the attribute is present, the
13047-
value must <span data-x="case-sensitive">case-sensitively</span> match one of the <span
13048-
data-x="concept-request-destination">destination keywords</span>. The default value is the empty
13049-
string. The attribute may be omitted. The attribute must not be specified on <code>link</code>
13050-
elements that do not have a <code data-x="attr-link-rel">rel</code> attribute that contains the
13039+
given by the <code data-x="attr-link-href">href</code> attribute. It is an <span>enumerated
13040+
attribute</span>. Each <span data-x="concept-request-destination">request destination</span>,
13041+
including the empty string, is a keyword for this attribute, mapping to a state of the same name.
13042+
The attribute's <i data-x="missing value default">missing value default</i> and <i data-x="invalid
13043+
value default">invalid value default</i> are both the empty string state. The attribute may be
13044+
omitted. The attribute must not be specified on <code>link</code> elements that do not have a
13045+
<code data-x="attr-link-rel">rel</code> attribute that contains the
1305113046
<code data-x="rel-preload">preload</code> keyword.<span w-nodev> User agents must implement the
1305213047
processing model of the <code data-x="attr-link-as">as</code> attribute described in
1305313048
<cite>Preload</cite>. <ref spec=FETCH> <ref spec=PRELOAD></span></p>
@@ -13095,7 +13090,6 @@ interface <dfn>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
1309513090
<hr>
1309613091

1309713092
<p>The IDL attributes
13098-
<dfn><code data-x="dom-link-as">as</code></dfn>,
1309913093
<dfn><code data-x="dom-link-href">href</code></dfn>,
1310013094
<dfn><code data-x="dom-link-hreflang">hreflang</code></dfn>,
1310113095
<dfn><code data-x="dom-link-integrity">integrity</code></dfn>,
@@ -13110,6 +13104,10 @@ interface <dfn>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
1311013104
<p class="note">There is no reflecting IDL attribute for the <code
1311113105
data-x="attr-link-color">color</code> attribute, but this might be added later.</p>
1311213106

13107+
<p>The <dfn><code data-x="dom-link-as">as</code></dfn> IDL attribute must <span>reflect</span> the
13108+
<code data-x="attr-link-as">as</code> content attribute, <span>limited to only known
13109+
values</span>.</p>
13110+
1311313111
<p>The <dfn><code data-x="dom-link-crossOrigin">crossOrigin</code></dfn> IDL attribute must
1311413112
<span>reflect</span> the <code data-x="attr-link-crossorigin">crossorigin</code> content
1311513113
attribute.</p>

0 commit comments

Comments
 (0)