Skip to content

Commit

Permalink
Normative: change idempotency for HostImportModuleDynamically (tc39#1645
Browse files Browse the repository at this point in the history
)

This allows failures to become successes on later calls. This better matches HostResolveImportedModule, which only requires idempotency when it completes normally (which is analogous to the success case here).

Closes tc39/proposal-dynamic-import#80, at least on the ECMAScript side.
  • Loading branch information
domenic authored and ljharb committed Aug 18, 2019
1 parent 8f0f692 commit d417f5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -22706,7 +22706,7 @@ <h1>Runtime Semantics: HostImportModuleDynamically ( _referencingScriptOrModule_
</dl>
</li>
<li>
Every call to HostImportModuleDynamically with the same _referencingScriptOrModule_ and _specifier_ arguments must conform to the <em>same</em> set of requirements above as previous calls do. That is, if the host environment takes the success path once for a given _referencingScriptOrModule_, _specifier_ pair, it must always do so, and the same for the failure path.
If the host environment takes the success path once for a given _referencingScriptOrModule_, _specifier_ pair, it must always do so for subsequent calls.
</li>
<li>
The operation must not call _promiseCapability_.[[Resolve]] or _promiseCapability_.[[Reject]], but instead must treat _promiseCapability_ as an opaque identifying value to be passed through to FinishDynamicImport.
Expand Down

0 comments on commit d417f5d

Please sign in to comment.