Skip to content

Commit 623cfe9

Browse files
annevkAlice Boxhall
authored andcommitted
Align with URL API changes for file and non-special URLs
This change builds on whatwg/url#224. Tests: web-platform-tests/wpt#4696. Location API bits are not tested since we generally treat loading from file URLs as out-of-scope for the web platform, but accounting for it standards-wise seemed trivial enough.
1 parent 402f96f commit 623cfe9

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

source

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,6 +2570,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
25702570
<li>An <dfn data-x-href="https://url.spec.whatwg.org/#http-scheme">HTTP(S) scheme</dfn></li>
25712571
<li>A <dfn data-x-href="https://url.spec.whatwg.org/#network-scheme">network scheme</dfn></li>
25722572
<li>A <dfn data-x-href="https://url.spec.whatwg.org/#fetch-scheme">fetch scheme</dfn></li>
2573+
<li>The <dfn data-x-href="https://url.spec.whatwg.org/#cannot-have-a-username-password-port">cannot have a username/password/port</dfn> concept</li>
25732574
<li>The <dfn data-x="concept-url-serializer" data-x-href="https://url.spec.whatwg.org/#concept-url-serializer">URL serializer</dfn></li>
25742575
<li>The <dfn data-x-href="https://url.spec.whatwg.org/#concept-host-parser">host parser</dfn></li>
25752576
<li>The <dfn data-x="host serializer" data-x-href="https://url.spec.whatwg.org/#concept-host-serializer">host serializer</dfn></li>
@@ -21765,9 +21766,8 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {
2176521766
<li><p>Let <var>url</var> be this element's <span
2176621767
data-x="concept-hyperlink-url">url</span>.</p></li>
2176721768

21768-
<li><p>If <var>url</var> or <var>url</var>'s <span data-x="concept-url-host">host</span> is null,
21769-
or <var>url</var>'s <span>cannot-be-a-base-URL flag</span> is set, terminate these
21770-
steps.</p></li>
21769+
<li><p>If <var>url</var> is null or <var>url</var>
21770+
<span>cannot have a username/password/port</span>, then return.</p></li>
2177121771

2177221772
<li><p><span>Set the username</span>, given <var>url</var> and the given value.</p></li>
2177321773

@@ -21797,9 +21797,8 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {
2179721797
<li><p>Let <var>url</var> be this element's <span
2179821798
data-x="concept-hyperlink-url">url</span>.</p></li>
2179921799

21800-
<li><p>If <var>url</var> or <var>url</var>'s <span data-x="concept-url-host">host</span> is null,
21801-
or <var>url</var>'s <span>cannot-be-a-base-URL flag</span> is set, terminate these
21802-
steps.</p></li>
21800+
<li><p>If <var>url</var> is null or <var>url</var>
21801+
<span>cannot have a username/password/port</span>, then return.</p></li>
2180321802

2180421803
<li><p><span>Set the password</span>, given <var>url</var> and the given value.</p></li>
2180521804

@@ -21905,10 +21904,8 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {
2190521904
<li><p>Let <var>url</var> be this element's <span
2190621905
data-x="concept-hyperlink-url">url</span>.</p></li>
2190721906

21908-
<li><p>If <var>url</var> or <var>url</var>'s <span data-x="concept-url-host">host</span> is null,
21909-
<var>url</var>'s <span>cannot-be-a-base-URL flag</span> is set, or <var>url</var>'s <span
21910-
data-x="concept-url-scheme">scheme</span> is "<code data-x="">file</code>", terminate these
21911-
steps.</p></li>
21907+
<li><p>If <var>url</var> is null or <var>url</var>
21908+
<span>cannot have a username/password/port</span>, then return.</p></li>
2191221909

2191321910
<li><p>If the given value is the empty string, then set <var>url</var>'s <span
2191421911
data-x="concept-url-port">port</span> to null.</p></li>
@@ -80997,10 +80994,8 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
8099780994
<li><p>Let <var>copyURL</var> be a copy of this <code>Location</code> object's <span
8099880995
data-x="concept-location-url">url</span>.</p></li>
8099980996

81000-
<li><p>If <var>copyURL</var>'s <span data-x="concept-url-host">host</span> is null,
81001-
<var>copyURL</var>'s <span>cannot-be-a-base-URL flag</span> is set, or <var>copyURL</var>'s <span
81002-
data-x="concept-url-scheme">scheme</span> is "<code data-x="">file</code>", terminate these
81003-
steps.</p></li>
80997+
<li><p>If <var>copyURL</var> <span>cannot have a username/password/port</span>, then
80998+
return.</p></li>
8100480999

8100581000
<li><p>If the given value is the empty string, then set <var>copyURL</var>'s <span
8100681001
data-x="concept-url-port">port</span> to null.</p></li>

0 commit comments

Comments
 (0)