From eb9e34a2ac4e2f1d45e83984cadf86a50b6b6a16 Mon Sep 17 00:00:00 2001
From: Daniel Ehrenberg Users agents that support JavaScript must also implement ECMAScript
Internationalization API. User agents that support JavaScript must also implement the top-level await
+ proposal. To run a module script given a module script script,
- with an optional rethrow errors boolean:[LegacyFactoryFunction][LegacyLenientThis][LegacyNullToEmptyString]
If rethrow errors is not given, let it be false.
If report errors is not given, let it be true.
Let settings be the settings object of script.
Prepare to run script given settings.
Let evaluationStatus be null.
If script's error to - rethrow is not null, then set evaluationStatus to Completion { [[Type]]: throw, - [[Value]]: script's error to - rethrow, [[Target]]: empty }.
Otherwise:
@@ -90462,35 +90465,26 @@ document.querySelector("button").addEventListener("click", bound); data-x="concept-script-record">record.Set evaluationStatus to record.Let evaluationPromise be 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
- }.
QuotaExceededError" DOMException.
If evaluationStatus is an abrupt completion, then:
- -If rethrow errors is true, rethrow the exception given by - evaluationStatus.[[Value]].
Otherwise, report the exception given by - evaluationStatus.[[Value]] for script.
If report errors is true, 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
@@ -91245,26 +91239,20 @@ import "https://example.com/foo/../module2.mjs";
If result is null, then: Let completion be Completion { [[Type]]: throw, [[Value]]: a new
- Let promise be a promise rejected with a new Perform FinishDynamicImport(referencingScriptOrModule,
- specifier, promiseCapability, completion).
-
TypeError, [[Target]]: empty }.TypeError.
Return.
Return undefined.
Run the module script result, with - the rethrow errors boolean set to true.
Let promise be the result of running a + module script given result and false.
If running the module script throws an exception, then perform - FinishDynamicImport(referencingScriptOrModule, specifier, - promiseCapability, the thrown exception completion).
Otherwise, perform - FinishDynamicImport(referencingScriptOrModule, specifier, - promiseCapability, NormalCompletion(undefined)).
Perform FinishDynamicImport(referencingScriptOrModule, + specifier, promiseCapability, promise).
Return undefined.
Let settings be the settings object of script.
Check if we can run script with settings. If this returns "do - not run" then return NormalCompletion(empty).
Prepare to run script given settings.
To run a classic script given a classic script script - and an optional rethrow errors boolean:
+ and an optional boolean rethrow errors (default false):If rethrow errors is not given, let it be false.
Let settings be the settings object of script.
Check if we can run script with settings. If this returns "do @@ -90439,12 +90437,10 @@ document.querySelector("button").addEventListener("click", bound);
To run a module script given a module script script, - with an optional report errors boolean:
+To run a module script given a module script script + and an optional boolean preventErrorReporting (default false):
If report errors is not given, let it be true.
Let settings be the settings object of script.
Check if we can run script with settings. If this returns "do @@ -90472,13 +90468,13 @@ document.querySelector("button").addEventListener("click", bound);
If Evaluate fails to complete as a result of the user agent
aborting the running script, then let
- evaluationPromise be a promise rejected with a new
+ evaluationPromise be a promise rejected with a new
"QuotaExceededError" DOMException.
If report errors is true, then upon rejection of +
If preventErrorReporting is false, then upon rejection of evaluationPromise with reason, report the exception given by reason for script.
If result is null, then:
Let promise be a promise rejected with a new TypeError.
Let promise be a promise rejected with a new
+ TypeError.
Perform FinishDynamicImport(referencingScriptOrModule, specifier, promiseCapability, promise).
Let promise be the result of running a - module script given result and false.
Perform FinishDynamicImport(referencingScriptOrModule, specifier, promiseCapability, promise).
Users agents that support JavaScript must also implement ECMAScript Internationalization API.
-User agents that support JavaScript must also implement the top-level await +
User agents that support JavaScript must also implement the Top-Level Await proposal.
@@ -90448,8 +90448,10 @@ document.querySelector("button").addEventListener("click", bound);Prepare to run script given settings.
Let evaluationPromise be null.
If script's error to - rethrow is not null, then let evaluationPromise be a promise rejected + rethrow is not null, then set evaluationPromise to a promise rejected with script's error to rethrow.
Let evaluationPromise be 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 let
- evaluationPromise be a promise rejected with a new
+ aborting the running script, then set
+ evaluationPromise to a promise rejected with a new
"QuotaExceededError" DOMException.
If result is null, then:
- -Let promise be a promise rejected with a new
- TypeError.
Let promise be null. -
Perform FinishDynamicImport(referencingScriptOrModule, - specifier, promiseCapability, promise).
Return undefined.
If result is null, then set promise to a promise rejected
+ with a new TypeError.
Let promise be the result of running a - module script given result and true.
Otherwise, set promise to the result of running a module script given result and true.
Perform FinishDynamicImport(referencingScriptOrModule, specifier, promiseCapability, promise).