From d6ce12a400ef8755705825349558dcf4120ddfec Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 19 Sep 2023 17:11:56 +0200 Subject: [PATCH] Editorial: remove API URL character encoding This makes it clearer that only when Document objects are involved encoding-parsing a URL will do something special. Fixes #9728. --- source | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/source b/source index 15a5d9ca7f5..73646634775 100644 --- a/source +++ b/source @@ -7091,9 +7091,17 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute URL.

    -
  1. Let encoding be environment's character encoding, if environment is a Document object; - otherwise environment's API URL character encoding.

  2. +
  3. Let encoding be UTF-8.

  4. + +
  5. If environment is a Document object, then set encoding + to environment's character + encoding.

  6. + +
  7. Otherwise, if environment's relevant global object is a + Window object, set encoding to environment's relevant + global object's associated + Document's character + encoding.

  8. Let baseURL be environment's base URL, if environment is a Document object; otherwise @@ -87951,13 +87959,6 @@ interface BarProp { Document.

    -
    The API URL character encoding
    -
    -

    Return the current character encoding - of window's associated - Document.

    -
    -
    The API base URL

    Return the current base URL of window's @@ -102163,13 +102164,6 @@ new PaymentRequest(…); // Allowed to use

    A module map that is used when importing JavaScript modules.

    -
    An API URL character encoding
    - -
    -

    A character encoding used to encode URLs by APIs called by scripts that use this environment - settings object.

    -
    -
    An API base URL
    @@ -112115,9 +112109,8 @@ dictionary EventSourceInit {
  9. Let settings be ev's relevant settings object. -

  10. Let urlRecord be the result of parsing - url with settings's API base URL and settings's - API URL character encoding.

  11. +
  12. Let urlRecord be the result of encoding-parsing a URL given + url, relative to settings.

  13. If urlRecord is failure, then throw a "SyntaxError" DOMException.

  14. @@ -115105,11 +115098,6 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope data-x="concept-WorkerGlobalScope-module-map">module map.

    -
    The API URL character encoding
    -
    -

    Return UTF-8.

    -
    -
    The API base URL

    Return worker global scope's WorkletGlobalScope {}; data-x="concept-WorkletGlobalScope-module-map">module map.

    -
    The API URL character encoding
    -
    -

    Return UTF-8.

    -
    -
    The API base URL

    Return inheritedAPIBaseURL.