Skip to content

Commit 29271b5

Browse files
authored
Automatically exclude the empty string as canonical keyword
This change carves out an exception to keyword canonicalization where if an enumerated attribute state maps to two keywords, with one of them being the empty string, then the canonical keyword is automatically the other keyword. Fixes #11297 and fixes #11298.
1 parent 8abe559 commit 29271b5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

source

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5193,6 +5193,10 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
51935193
<li><p>If there is only one <em>conforming</em> keyword mapping to the given state, then it is
51945194
that conforming keyword.</p></li>
51955195

5196+
<li><p>If there are two conforming keywords mapping to the given state, and one is the empty
5197+
string, then the canonical keyword will be the conforming keyword that is not the empty
5198+
string.</p></li>
5199+
51965200
<li><p>Otherwise, the canonical keyword for the state will be explicitly given in the
51975201
specification for the attribute.</p></li>
51985202
</ul>
@@ -7585,10 +7589,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
75857589
<p>The attribute's <i data-x="missing value default">missing value default</i> is the <dfn
75867590
data-x="attr-crossorigin-none">No CORS</dfn> state, and its <i data-x="invalid value
75877591
default">invalid value default</i> is the <span
7588-
data-x="attr-crossorigin-anonymous">Anonymous</span> state. For the purposes of <span
7589-
data-x="reflect">reflection</span>, the <span>canonical keyword</span> for the <span
7590-
data-x="attr-crossorigin-anonymous">Anonymous</span> state is the <code
7591-
data-x="attr-crossorigin-anonymous-keyword">anonymous</code> keyword.</p>
7592+
data-x="attr-crossorigin-anonymous">Anonymous</span> state.</p>
75927593

75937594
<p>The majority of fetches governed by <span data-x="CORS settings attribute">CORS settings
75947595
attributes</span> will be done via the <span>create a potential-CORS request</span> algorithm.</p>

0 commit comments

Comments
 (0)