Skip to content

Commit

Permalink
Editorial: remove API URL character encoding
Browse files Browse the repository at this point in the history
This makes it clearer that only when Document objects are involved encoding-parsing a URL will do something special.

Fixes whatwg#9728.
  • Loading branch information
annevk authored and mfreed7 committed Oct 11, 2023
1 parent 72a32e7 commit de62bb6
Showing 1 changed file with 13 additions and 30 deletions.
43 changes: 13 additions & 30 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -7095,9 +7095,17 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<span>URL</span>.</p>

<ol>
<li><p>Let <var>encoding</var> be <var>environment</var>'s <span data-x="document's character
encoding">character encoding</span>, if <var>environment</var> is a <code>Document</code> object;
otherwise <var>environment</var>'s <span>API URL character encoding</span>.</p></li>
<li><p>Let <var>encoding</var> be <span>UTF-8</span>.</p></li>

<li><p>If <var>environment</var> is a <code>Document</code> object, then set <var>encoding</var>
to <var>environment</var>'s <span data-x="document's character encoding">character
encoding</span>.</p></li>

<li><p>Otherwise, if <var>environment</var>'s <span>relevant global object</span> is a
<code>Window</code> object, set <var>encoding</var> to <var>environment</var>'s <span>relevant
global object</span>'s <span data-x="concept-document-window">associated
<code>Document</code></span>'s <span data-x="document's character encoding">character
encoding</span>.</p></li>

<li><p>Let <var>baseURL</var> be <var>environment</var>'s <span data-x="document base URL">base
URL</span>, if <var>environment</var> is a <code>Document</code> object; otherwise
Expand Down Expand Up @@ -88004,13 +88012,6 @@ interface <dfn interface>BarProp</dfn> {
<code>Document</code></span>.</p>
</dd>

<dt>The <span>API URL character encoding</span></dt>
<dd>
<p>Return the current <span data-x="document's character encoding">character encoding</span>
of <var>window</var>'s <span data-x="concept-document-window">associated
<code>Document</code></span>.</p>
</dd>

<dt>The <span>API base URL</span></dt>
<dd>
<p>Return the current <span data-x="document base URL">base URL</span> of <var>window</var>'s
Expand Down Expand Up @@ -102224,13 +102225,6 @@ new PaymentRequest(&hellip;); // Allowed to use
<p>A <span>module map</span> that is used when importing JavaScript modules.</p>
</dd>

<dt>An <dfn export for="environment settings object">API URL character encoding</dfn></dt>

<dd>
<p>A character encoding used to encode URLs by APIs called by scripts that use this <span>environment
settings object</span>.</p>
</dd>

<dt>An <dfn export for="environment settings object">API base URL</dfn></dt>

<dd>
Expand Down Expand Up @@ -112176,9 +112170,8 @@ dictionary <dfn dictionary>EventSourceInit</dfn> {

<li><p>Let <var>settings</var> be <var>ev</var>'s <span>relevant settings object</span>.

<li><p>Let <var>urlRecord</var> be the result of <span data-x="URL parser">parsing</span>
<var>url</var> with <var>settings</var>'s <span>API base URL</span> and <var>settings</var>'s
<span>API URL character encoding</span>.</p></li>
<li><p>Let <var>urlRecord</var> be the result of <span>encoding-parsing a URL</span> given
<var>url</var>, relative to <var>settings</var>.</p></li>

<li><p>If <var>urlRecord</var> is failure, then throw a <span>"<code>SyntaxError</code>"</span>
<code>DOMException</code>.</p></li>
Expand Down Expand Up @@ -115166,11 +115159,6 @@ interface <dfn interface>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope
data-x="concept-WorkerGlobalScope-module-map">module map</span>.</p>
</dd>

<dt>The <span>API URL character encoding</span></dt>
<dd>
<p>Return <span>UTF-8</span>.</p>
</dd>

<dt>The <span>API base URL</span></dt>
<dd>
<p>Return <var>worker global scope</var>'s <span
Expand Down Expand Up @@ -116374,11 +116362,6 @@ interface <dfn interface>WorkletGlobalScope</dfn> {};</code></pre>
data-x="concept-WorkletGlobalScope-module-map">module map</span>.</p>
</dd>

<dt>The <span>API URL character encoding</span></dt>
<dd>
<p>Return <span>UTF-8</span>.</p>
</dd>

<dt>The <span>API base URL</span></dt>
<dd>
<p>Return <var>inheritedAPIBaseURL</var>.</p>
Expand Down

0 comments on commit de62bb6

Please sign in to comment.