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 #9728.
  • Loading branch information
annevk authored Sep 19, 2023
1 parent 59e75bb commit d6ce12a
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 @@ -7091,9 +7091,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 @@ -87951,13 +87959,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 @@ -102163,13 +102164,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 @@ -112115,9 +112109,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 @@ -115105,11 +115098,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 @@ -116313,11 +116301,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 d6ce12a

Please sign in to comment.