diff --git a/source b/source index 4b2bb402eca..7f5d0f743d0 100644 --- a/source +++ b/source @@ -3064,7 +3064,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
User agents that support JavaScript must also implement the BigInt proposal.
-User agents that support JavaScript must also implement the top-level await - proposal:
+User agents that support JavaScript must also implement the top-level await proposal. + The following terms are defined there, and used in this specification:
+FlushJobs
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:
@@ -88968,44 +88967,26 @@ interface ApplicationCache : EventTarget { 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 +
If rethrow errors is false, then upon rejection of + evaluationPromise, report the exception given by evaluationStatus.[[Value]] for script.
If IsPromise(evaluationStatus) is true, then:
- -Upon rejection of evaluationStatus 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
@@ -89787,6 +89768,24 @@ document.querySelector("button").addEventListener("click", bound);
+ When the JavaScript specification says to call the FlushJobs abstract operation, the
+ following algorithm must be used in place of JavaScript's FlushJobs: Assert: the JavaScript execution context stack is empty Perform a microtask checkpoint. Rather than simply a microtask checkpoint,
+ this algorithm may yield to the event loop before continuing; see discussion in issue #4400. 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).FlushJobs()
+
+
+
Integration with the JavaScript module system
@@ -90071,42 +90070,23 @@ import "https://example.com/foo/../module2.mjs";
-
TypeError
, [[Target]]: empty }.TypeError
.
Return.
Run the module script result, with - the rethrow errors boolean set to true, and let the result be status.
If running the module script throws an exception, then perform +
Perform FinishDynamicImport(referencingScriptOrModule, specifier, - promiseCapability, the thrown exception completion).
If IsPromise(status) is true, then:
- -Otherwise, perform - FinishDynamicImport(referencingScriptOrModule, specifier, - promiseCapability, NormalCompletion(undefined)).
Return undefined.
Return.