From d417f5d3002363afd00fa447e075d27cc289dc29 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Thu, 25 Jul 2019 11:06:22 -0700 Subject: [PATCH] Normative: change idempotency for HostImportModuleDynamically (#1645) 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 https://github.com/tc39/proposal-dynamic-import/issues/80, at least on the ECMAScript side. --- spec.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.html b/spec.html index 19530ef8ea..aa6a0c320c 100644 --- a/spec.html +++ b/spec.html @@ -22706,7 +22706,7 @@

Runtime Semantics: HostImportModuleDynamically ( _referencingScriptOrModule_
  • - Every call to HostImportModuleDynamically with the same _referencingScriptOrModule_ and _specifier_ arguments must conform to the same 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.
  • 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.