diff --git a/source b/source index d056382f8cc..093339b50c2 100644 --- a/source +++ b/source @@ -103908,11 +103908,13 @@ document.querySelector("button").addEventListener("click", bound);
Scripts
-

A script is one of three possible structs. All scripts have:

+

A script is one of two possible structs (namely, a classic script or a + module script). All scripts have:

-
A settings object
+
A settings object

An environment settings object, containing various settings that are shared with other scripts in the same context.

@@ -103968,8 +103970,8 @@ document.querySelector("button").addEventListener("click", bound);
Fetch options
-
A script fetch options, containing various options related to fetching this - script or module scripts that it imports.
+
Null or a script fetch options, containing various options related to fetching + this script or module scripts that it imports.
A base URL
@@ -104984,7 +104986,8 @@ document.querySelector("button").addEventListener("click", bound);
  • Let script be a new classic script that this algorithm will subsequently initialize.

  • -
  • Set script's settings object to settings.

  • +
  • Set script's settings + object to settings.

  • Set script's base URL to baseURL.

  • @@ -105036,7 +105039,8 @@ document.querySelector("button").addEventListener("click", bound);
  • Let script be a new module script that this algorithm will subsequently initialize.

  • -
  • Set script's settings object to settings.

  • +
  • Set script's settings + object to settings.

  • Set script's base URL to baseURL.

  • @@ -105144,7 +105148,8 @@ document.querySelector("button").addEventListener("click", bound);
  • Let script be a new module script that this algorithm will subsequently initialize.

  • -
  • Set script's settings object to settings.

  • +
  • Set script's settings + object to settings.

  • Set script's base URL and fetch options to null.

  • @@ -105183,7 +105188,8 @@ document.querySelector("button").addEventListener("click", bound);
  • Let script be a new module script that this algorithm will subsequently initialize.

  • -
  • Set script's settings object to settings.

  • +
  • Set script's settings + object to settings.

  • Set script's base URL and fetch options to null.

  • @@ -105269,7 +105275,8 @@ document.querySelector("button").addEventListener("click", bound); and an optional boolean rethrow errors (default false):

      -
    1. Let settings be the settings object of script.

    2. +
    3. Let settings be the settings + object of script.

    4. Check if we can run script with settings. If this returns "do not run" then return NormalCompletion(empty).

    5. @@ -105350,7 +105357,8 @@ document.querySelector("button").addEventListener("click", bound); and an optional boolean preventErrorReporting (default false):

        -
      1. Let settings be the settings object of script.

      2. +
      3. Let settings be the settings + object of script.

      4. Check if we can run script with settings. If this returns "do not run", then return a promise resolved with with undefined.

      5. @@ -105583,9 +105591,9 @@ document.querySelector("button").addEventListener("click", bound); data-x="concept-script">script, with the problematic position (line number and column number) in the resource containing the script, using the global object specified by the script's - settings object as the target. If the error is still not handled after this, then the error may be reported to a - developer console.

        + settings object as the target. If the error + is still not handled after this, then the error may be + reported to a developer console.

        The existence of both report an error and report an exception is confusing, and both algorithms @@ -105830,8 +105838,8 @@ dictionary PromiseRejectionEventInit : EventInitIf referringScript is not null, then:

          -
        1. Set settingsObject to referringScript's settings - object.

        2. +
        3. Set settingsObject to referringScript's + settings object.

        4. Set baseURL to referringScript's base URL.

        5. @@ -106603,7 +106611,8 @@ dictionary PromiseRejectionEventInit : EventInit

          Let settings object be the current settings object.

        6. If script is not null, then set settings object to - script's settings object.

        7. + script's settings + object.

        8. If operation is "reject", then:

          @@ -106879,8 +106888,9 @@ dictionary PromiseRejectionEventInit : EventInit

          If active script is not null, set script execution context to a new JavaScript execution context, with its Function field set to null, its Realm field - set to active script's settings object's realm, and its ScriptOrModule set to active script's + set to active script's settings + object's realm, and its + ScriptOrModule set to active script's record.

          As seen below, this is used in order to propagate the current active @@ -107167,8 +107177,8 @@ import "https://example.com/foo/../module2.mjs";

          1. Set referencingScript to referrer.[[HostDefined]].

            -
          2. Set settingsObject to referencingScript's settings - object.

          3. +
          4. Set settingsObject to referencingScript's settings object.

          5. Set fetchOptions to the new descendant script fetch options for referencingScript's fetch @@ -107228,14 +107238,14 @@ import "https://example.com/foo/../module2.mjs";

            1. Set destination to loadState.[[Destination]].

            2. -
            3. Set fetchClient loadState.[[FetchClient]].

            4. +
            5. Set fetchClient to loadState.[[FetchClient]].

          6. Fetch a single imported module script given url, fetchClient, destination, fetchOptions, - settingsObject fetchReferrer, moduleRequest, and + settingsObject, fetchReferrer, moduleRequest, and onSingleFetchComplete as defined below. If loadState is not undefined and loadState.[[PerformFetch]] is not null, pass loadState.[[PerformFetch]] along as well.

            @@ -107267,8 +107277,8 @@ import "https://example.com/foo/../module2.mjs";
          7. Otherwise, set completion to Completion Record { [[Type]]: - normal, [[Value]]: result's record, - [[Target]]: empty }.

          8. + normal, [[Value]]: moduleScript's + record, [[Target]]: empty }.

          9. Perform FinishLoadingImportedModule(referrer, moduleRequest, payload, completion).

          10. @@ -107544,7 +107554,7 @@ import "https://example.com/foo/../module2.mjs"; the browsing context's active document.

          11. If the task is being queued by or for a script, then - return the script's settings object's settings object's global object's associated Document.

          12. @@ -116630,9 +116640,9 @@ interface SharedWorker : EventTarget {
          13. If worker global scope is not null, but the user agent has been configured to disallow communication between the worker represented by the worker global - scope and the scripts whose settings object is outside settings, then set worker global - scope to null.

            + scope and the scripts whose settings object is outside settings, + then set worker global scope to null.

            For example, a user agent could have a development mode that isolates a particular top-level traversable from all other pages, and scripts in that @@ -132924,10 +132934,11 @@ if (s = prompt('What is your name?')) {

          14. None of the elements in the Document are in any of the following namespaces: HTML namespace, SVG namespace, MathML namespace
          15. The Document has no focusable area (e.g. from XLink) other than the viewport.
          16. The Document has no hyperlinks (e.g. from XLink). -
          17. There exists no script whose settings - object's global object is a - Window object with this Document as its associated Document. +
          18. There exists no script whose settings object's global object is a Window object with + this Document as its associated + Document.
          19. None of the elements in the Document have any registered event listeners.