Skip to content

Commit

Permalink
Editorial: align with URL's cannot-be-base-URL removal
Browse files Browse the repository at this point in the history
These URLs now have a path whose value is a string rather than a list.

See whatwg/url#655 for context.
  • Loading branch information
annevk committed Oct 19, 2021
1 parent 8e301e8 commit db2d279
Showing 1 changed file with 22 additions and 49 deletions.
71 changes: 22 additions & 49 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2353,14 +2353,15 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x="concept-url-path" data-x-href="https://url.spec.whatwg.org/#concept-url-path">path</dfn></li>
<li><dfn data-x="concept-url-query" data-x-href="https://url.spec.whatwg.org/#concept-url-query">query</dfn></li>
<li><dfn data-x="concept-url-fragment" data-x-href="https://url.spec.whatwg.org/#concept-url-fragment">fragment</dfn></li>
<li><dfn data-x-href="https://url.spec.whatwg.org/#url-cannot-be-a-base-url-flag">cannot-be-a-base-URL</dfn></li>
<li><dfn data-x="concept-url-blob-entry" data-x-href="https://url.spec.whatwg.org/#concept-url-blob-entry">blob URL entry</dfn></li>
</ul>
</li>
<li><dfn data-x-href="https://url.spec.whatwg.org/#valid-url-string">valid URL string</dfn></li>
<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>
<li>The <dfn data-x-href="https://url.spec.whatwg.org/#url-opaque-path">opaque path</dfn> concept</li>
<li><dfn data-x="concept-url-serializer" data-x-href="https://url.spec.whatwg.org/#concept-url-serializer">URL serializer</dfn> and its
<dfn data-x="url serializer exclude fragment" data-x-href="https://url.spec.whatwg.org/#url-serializer-exclude-fragment">exclude fragment</dfn> argument</li>
<li><dfn data-x-href="https://url.spec.whatwg.org/#url-path-serializer">URL path serializer</dfn></li>
<li>The <dfn data-x-href="https://url.spec.whatwg.org/#concept-host-parser">host parser</dfn></li>
<li>The <dfn data-x="host serializer" data-x-href="https://url.spec.whatwg.org/#concept-host-serializer">host serializer</dfn></li>
<li><dfn data-x-href="https://url.spec.whatwg.org/#concept-host-equals">Host equals</dfn></li>
Expand Down Expand Up @@ -23393,8 +23394,8 @@ document.body.appendChild(wbr);</code></pre>

<ol>
<li><p>If element's <span data-x="concept-hyperlink-url">url</span> is non-null, its <span
data-x="concept-url-scheme">scheme</span> is "<code data-x="">blob</code>", and its
<span>cannot-be-a-base-URL</span> is true, terminate these steps.</p></li>
data-x="concept-url-scheme">scheme</span> is "<code data-x="">blob</code>", and it has an
<span>opaque path</span>, then terminate these steps.</p></li>

<li><p><span data-x="concept-hyperlink-url-set">Set the url</span>.</p></li>
</ol>
Expand Down Expand Up @@ -23568,8 +23569,8 @@ document.body.appendChild(wbr);</code></pre>
<li><p>Let <var>url</var> be this element's <span
data-x="concept-hyperlink-url">url</span>.</p></li>

<li><p>If <var>url</var> is null or <var>url</var>'s <span>cannot-be-a-base-URL</span> is true,
then return.</p></li>
<li><p>If <var>url</var> is null or <var>url</var> has an <span>opaque path</span>, then
return.</p></li>

<li><p><span data-x="basic url parser">Basic URL parse</span> the given value, with
<var>url</var> as <span data-x="basic url parser url"><i>url</i></span> and <span>host
Expand Down Expand Up @@ -23604,8 +23605,8 @@ document.body.appendChild(wbr);</code></pre>
<li><p>Let <var>url</var> be this element's <span
data-x="concept-hyperlink-url">url</span>.</p></li>

<li><p>If <var>url</var> is null or <var>url</var>'s <span>cannot-be-a-base-URL</span> is true,
then return.</p></li>
<li><p>If <var>url</var> is null or <var>url</var> has an <span>opaque path</span>, then
return.</p></li>

<li><p><span data-x="basic url parser">Basic URL parse</span> the given value, with
<var>url</var> as <span data-x="basic url parser url"><i>url</i></span> and <span>hostname
Expand Down Expand Up @@ -23662,17 +23663,10 @@ document.body.appendChild(wbr);</code></pre>
<li><p>Let <var>url</var> be this element's <span
data-x="concept-hyperlink-url">url</span>.</p></li>

<li><p>If <var>url</var> is null, return the empty string.</p></li>

<li><p>If <var>url</var>'s <span>cannot-be-a-base-URL</span> is true, then return
<var>url</var>'s <span data-x="concept-url-path">path</span>[0].</p></li>

<li><p>If <var>url</var>'s <span data-x="concept-url-path">path</span> is empty, then return the
empty string.</p></li>
<li><p>If <var>url</var> is null, then return the empty string.</p></li>

<li><p>Return "<code data-x="">/</code>", followed by the strings in <var>url</var>'s <span
data-x="concept-url-path">path</span> (including empty strings), separated from each other by
"<code data-x="">/</code>".</p></li>
<li><p>Return the result of <span data-x="URL path serializer">URL path serializing</span>
<var>url</var>.</p></li>
</ol>

<p>The <code data-x="dom-hyperlink-pathname">pathname</code> attribute's setter must run these
Expand All @@ -23684,8 +23678,8 @@ document.body.appendChild(wbr);</code></pre>
<li><p>Let <var>url</var> be this element's <span
data-x="concept-hyperlink-url">url</span>.</p></li>

<li><p>If <var>url</var> is null or <var>url</var>'s <span>cannot-be-a-base-URL</span> is true,
then return.</p></li>
<li><p>If <var>url</var> is null or <var>url</var> has an <span>opaque path</span>, then
return.</p></li>

<li><p>Set <var>url</var>'s <span data-x="concept-url-path">path</span> to the empty
list.</p></li>
Expand Down Expand Up @@ -85800,7 +85794,7 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
<li><p>Let <var>copyURL</var> be a copy of this <code>Location</code> object's <span
data-x="concept-location-url">url</span>.</p></li>

<li><p>If <var>copyURL</var>'s <span>cannot-be-a-base-URL</span> is true, then return.</p></li>
<li><p>If <var>copyURL</var> has an <span>opaque path</span>, then return.</p></li>

<li><p><span data-x="basic url parser">Basic URL parse</span> the given value, with
<var>copyURL</var> as <span data-x="basic url parser url"><i>url</i></span> and <span>host
Expand Down Expand Up @@ -85843,7 +85837,7 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
<li><p>Let <var>copyURL</var> be a copy of this <code>Location</code> object's <span
data-x="concept-location-url">url</span>.</p></li>

<li><p>If <var>copyURL</var>'s <span>cannot-be-a-base-URL</span> is true, then return.</p></li>
<li><p>If <var>copyURL</var> has an <span>opaque path</span>, then return.</p></li>

<li><p><span data-x="basic url parser">Basic URL parse</span> the given value, with
<var>copyURL</var> as <span data-x="basic url parser url"><i>url</i></span> and <span>hostname
Expand Down Expand Up @@ -85909,18 +85903,8 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
data-x="concept-settings-object-origin">origin</span>, then throw a
<span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>Let <var>url</var> be this <code>Location</code> object's <span
data-x="concept-location-url">url</span>.</p></li>

<li><p>If <var>url</var>'s <span>cannot-be-a-base-URL</span> is true, then return
<var>url</var>'s <span data-x="concept-url-path">path</span>[0].</p></li>

<li><p>If <var>url</var>'s <span data-x="concept-url-path">path</span> is empty, then return the
empty string.</p></li>

<li><p>Return "<code data-x="">/</code>", followed by the strings in <var>url</var>'s <span
data-x="concept-url-path">path</span> (including empty strings), separated from each other by
"<code data-x="">/</code>".</p></li>
<li><p>Return the result of <span data-x="URL path serializer">URL path serializing</span> this
<code>Location</code> object's <span data-x="concept-location-url">url</span>.</p></li>
</ol>

<p>The <code data-x="dom-location-pathname">pathname</code> attribute's setter must run these
Expand All @@ -85938,7 +85922,7 @@ interface <dfn interface>Location</dfn> { // but see also <a href="#the-location
<li><p>Let <var>copyURL</var> be a copy of this <code>Location</code> object's <span
data-x="concept-location-url">url</span>.</p></li>

<li><p>If <var>copyURL</var>'s <span>cannot-be-a-base-URL</span> is true, then return.</p></li>
<li><p>If <var>copyURL</var> has an <span>opaque path</span>, then return.</p></li>

<li><p>Set <var>copyURL</var>'s <span data-x="concept-url-path">path</span> to the empty
list.</p></li>
Expand Down Expand Up @@ -103069,21 +103053,10 @@ interface <dfn interface>WorkerLocation</dfn> {
</ol>

<p>The <dfn attribute for="WorkerLocation"><code
data-x="dom-WorkerLocation-pathname">pathname</code></dfn> attribute's getter must run these
steps:</p>

<ol>
<li><p>Let <var>url</var> be the associated <span
data-x="concept-WorkerLocation-WorkerGlobalScope"><code>WorkerGlobalScope</code> object</span>'s
<span data-x="concept-WorkerGlobalScope-url">url</span>.</p></li>

<li><p>If <var>url</var>'s <span>cannot-be-a-base-URL</span> is true, then return
<var>url</var>'s <span data-x="concept-url-path">path</span>[0].</p></li>

<li><p>Return "<code data-x="">/</code>", followed by the strings in <var>url</var>'s <span
data-x="concept-url-path">path</span> (including empty strings), separated from each other by
"<code data-x="">/</code>".</p></li>
</ol>
data-x="dom-WorkerLocation-pathname">pathname</code></dfn> getter steps are to return the result
of <span data-x="URL path serializer">URL path serializing</span> the associated <span
data-x="concept-WorkerLocation-WorkerGlobalScope"><code>WorkerGlobalScope</code> object</span>'s
<span data-x="concept-WorkerGlobalScope-url">url</span>.</p>

<p>The <dfn attribute for="WorkerLocation"><code
data-x="dom-WorkerLocation-search">search</code></dfn> attribute's getter must run these
Expand Down

0 comments on commit db2d279

Please sign in to comment.