Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up[WIP] Top-level await integration #71
Conversation
This comment has been minimized.
This comment has been minimized.
Twin HTML PR whatwg/html#4352 |
Feb 10, 2019
This was referenced
ljharb
reviewed
Feb 10, 2019
@@ -70,7 +70,7 @@ <h1><ins>Runtime Semantics: HostImportModuleDynamically ( _referencingScriptOrMo | |||
|
|||
<dd> | |||
<ul> | |||
<li>At some future time, the host environment must perform FinishDynamicImport(_referencingScriptOrModule_, _specifier_, _promiseCapability_, NormalCompletion(*undefined*)).</li> | |||
<li>At some future time, the host environment must perform FinishDynamicImport(_referencingScriptOrModule_, _specifier_, _promiseCapability_, Promise.resolve(*undefined*)).</li> |
This comment has been minimized.
This comment has been minimized.
ljharb
Feb 10, 2019
Member
this would probably need to be specified in terms of an abstract op (like PromiseResolve
) rather than a global lookup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
littledan commentedFeb 10, 2019
The purpose of this patch is to nail down how dynamic import would
adjust to the needs of top-level await. The relevant change is,
the module.Evaluate() method will return a Promise that resolves
when the module is ready, and this will be passed to
FinishDynamicImport to wait on before resolving the Promise it returns.
This PR is just a sketch, not to be landed. For one, the "Upon fulfillment"
language will need to be changed to be more ECMASpeak-like. Top-level
await should also reach stage 3 before this change lands.
The PR where Evaluate returns a Promise is
guybedford/proposal-top-level-await#1