diff --git a/source b/source index 2529743aa6e..5b48e3cb727 100644 --- a/source +++ b/source @@ -2653,6 +2653,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute sequence of Unicode scalar values
  • overload resolution algorithm
  • exposed
  • +
  • a promise rejected with
  • +
  • upon rejection
  • [LegacyFactoryFunction]
  • [LegacyLenientThis]
  • [LegacyNullToEmptyString]
  • @@ -2866,6 +2868,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

    Users agents that support JavaScript must also implement ECMAScript Internationalization API.

    + +

    User agents that support JavaScript must also implement the Top-Level Await + proposal.

    @@ -90353,11 +90358,9 @@ document.querySelector("button").addEventListener("click", bound);
    Calling scripts

    To run a classic script given a classic script script - and an optional rethrow errors boolean:

    + and an optional boolean rethrow errors (default false):

      -
    1. If rethrow errors is not given, let it be false.

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

    4. Check if we can run script with settings. If this returns "do @@ -90434,25 +90437,23 @@ document.querySelector("button").addEventListener("click", bound);

    -

    To run a module script given a module script script, - with an optional rethrow errors boolean:

    +

    To run a module script given a module script script + and an optional boolean preventErrorReporting (default false):

      -
    1. If rethrow errors is not given, let it be false.

    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. + not run", then return a promise resolved with undefined.

    6. Prepare to run script given settings.

    7. -
    8. Let evaluationStatus be null.

    9. +
    10. Let evaluationPromise be null.

    11. If script's error to - rethrow is not null, then set evaluationStatus to Completion { [[Type]]: throw, - [[Value]]: script's error to - rethrow, [[Target]]: empty }.

    12. + rethrow is not null, then set evaluationPromise to a promise rejected + with script's error to + rethrow.

    13. Otherwise:

      @@ -90462,35 +90463,26 @@ document.querySelector("button").addEventListener("click", bound); data-x="concept-script-record">record.

    14. -

      Set evaluationStatus to record.Set evaluationPromise to record.Evaluate().

      This step will recursively evaluate all of the module's dependencies.

      If Evaluate fails to complete as a result of the user agent aborting the running script, then set - evaluationStatus to Completion { [[Type]]: throw, [[Value]]: a new - "QuotaExceededError" DOMException, [[Target]]: empty - }.

      + evaluationPromise to a promise rejected with a new + "QuotaExceededError" DOMException.

    -
  • -

    If evaluationStatus is an abrupt completion, then:

    - -
      -
    1. If rethrow errors is true, rethrow the exception given by - evaluationStatus.[[Value]].

    2. - -
    3. Otherwise, report the exception given by - evaluationStatus.[[Value]] for script.

    4. -
    -
  • +
  • If preventErrorReporting is false, then upon rejection of + evaluationPromise with reason, report the exception given by + reason for script.

  • Clean up after running script with settings.

  • -
  • Return evaluationStatus.

  • +
  • Return evaluationPromise.

  • The steps to check if we can run script with an environment settings @@ -91241,30 +91233,16 @@ import "https://example.com/foo/../module2.mjs"; URL, settings object, and fetch options. Wait until the algorithm asynchronously completes with result.

    -
  • -

    If result is null, then:

    - -
      -
    1. Let completion be Completion { [[Type]]: throw, [[Value]]: a new - TypeError, [[Target]]: empty }.

    2. - -
    3. Perform FinishDynamicImport(referencingScriptOrModule, - specifier, promiseCapability, completion).

    4. - -
    5. Return.

    6. -
    -
  • +
  • Let promise be null. -

  • Run the module script result, with - the rethrow errors boolean set to true.

  • +
  • If result is null, then set promise to a promise rejected + with a new TypeError.

  • -
  • If running the module script throws an exception, then perform - FinishDynamicImport(referencingScriptOrModule, specifier, - promiseCapability, the thrown exception completion).

  • +
  • Otherwise, set promise to the result of running a module script given result and true.

  • -
  • Otherwise, perform - FinishDynamicImport(referencingScriptOrModule, specifier, - promiseCapability, NormalCompletion(undefined)).

  • +
  • Perform FinishDynamicImport(referencingScriptOrModule, + specifier, promiseCapability, promise).

  • Return undefined.

  • @@ -123109,6 +123087,9 @@ INSERT INTERFACES HERE
    [JSINTL]
    ECMAScript Internationalization API Specification. Ecma International.
    +
    [JSTLA]
    +
    Top-Level Await. Ecma International.
    +
    [JSON]
    The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray. IETF.