Skip to content

Commit

Permalink
fix editorial issues raised by jmdyck
Browse files Browse the repository at this point in the history
  • Loading branch information
codehag committed May 17, 2021
2 parents b645558 + 2673423 commit d881b00
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -24404,33 +24404,40 @@ <h1>HostImportModuleDynamically ( _referencingScriptOrModule_, _specifier_, _pro
</emu-clause>

<emu-clause id="sec-finishdynamicimport" aoid="FinishDynamicImport">
<h1>FinishDynamicImport ( _referencingScriptOrModule_, _specifier_, _promiseCapability_, _completion_ )</h1>
<p>The abstract operation FinishDynamicImport takes arguments _referencingScriptOrModule_, _specifier_, _promiseCapability_ (a PromiseCapability Record), and _completion_. FinishDynamicImport completes the process of a dynamic import originally started by an <emu-xref href="#sec-import-calls">`import()`</emu-xref> call, resolving or rejecting the promise returned by that call as appropriate according to _completion_. It is performed by host environments as part of HostImportModuleDynamically. It performs the following steps when called:</p>
<emu-alg>
1. Let _stepsFulfilled_ be the steps of a CallDynamicImportFulfilled function as specified below.
1. Let _onFulfilled_ be CreateBuiltinFunction(_stepsFulfilled_, 0, *""*, &laquo; &raquo;).
<h1>FinishDynamicImport ( _referencingScriptOrModule_, _specifier_, _promiseCapability_, _innerPromise_ )</h1>
<p>The abstract operation FinishDynamicImport takes arguments _referencingScriptOrModule_, _specifier_, _promiseCapability_ (a PromiseCapability Record), and _innerPromise_. FinishDynamicImport completes the process of a dynamic import originally started by an <emu-xref href="#sec-import-calls">`import()`</emu-xref> call, resolving or rejecting the promise returned by that call as appropriate according to _innerPromise_'s resolution. It is performed by host environments as part of HostImportModuleDynamically. It performs the following steps when called:</p>
<emu-alg>
1. Let _stepsFulfilled_ be the steps of a CallDynamicImportResolved function as specified below.
1. Let _onFulfilled_ be CreateBuiltinFunction(_stepsFulfilled_, 0, *""*, &laquo; [[ReferencingScriptOrMoule]], [[Specifier]], [[PromiseCapability]] &raquo;).
1. Set _onFulfilled_.[[ReferencingScriptOrModule]] to _referencingScriptOrModule_.
1. Set _onFulfilled_.[[Specifier]] to _specifier_.
1. Set _onFulfilled_.[[PromiseCapability]] to _promiseCapability_.
1. Let _stepsRejected_ be the steps of a CallDynamicImportRejected function as specified below.
1. Let _onRejected_ be CreateBuiltinFunction(_stepsRejected_, 0, *""*, &laquo; &raquo;).
1. Let _innerPromise_ be *undefined*.
1. Let _onRejected_ be CreateBuiltinFunction(_stepsRejected_, 0, *""*, &laquo; [[PromiseCapability]] &raquo;).
1. Set _onRejected_.[[PromiseCapability]] to _promiseCapability_.
1. Perform ! PerformPromiseThen(_innerPromise_.[[Promise]], _onFulfilled_, _onRejected_).
</emu-alg>

<p>A CallDynamicImportFulfilled function is an anonymous built-in function with no internal slots and has one argument _result_. When a CallDynamicImportFulfilled function is called it performs the following steps:</p>
<p>A CallDynamicImportResolved function is an anonymous built-in function with the internal
slots [[ReferencingScriptOrModule]], [[Specifier]], and [[PromiseCapability]], and it takes
one argument, _result_. When a CallDynamicImportResolved function is called it performs the following steps:</p>
<emu-alg>
1. Assert: _result_ is *undefined*.
1. Let _referencingScriptOrModule_ be *undefined*.
1. Let _specifier_ be *undefined*.
1. Let _promiseCapability_ be *undefined*.
1. Let _F_ be the active function object.
1. Let _referencingScriptOrModule_ be _F_.[[ReferencingScriptOrModule]].
1. Let _specifier_ be _F_.[[Specifier]].
1. Let _promiseCapability_ be _F_.[[PromiseCapability]].
1. Let _moduleRecord_ be ! HostResolveImportedModule(_referencingScriptOrModule_, _specifier_).
1. Assert: Evaluate has already been invoked on _moduleRecord_ and successfully completed.
1. Let _namespace_ be GetModuleNamespace(_moduleRecord_).
1. If _namespace_ is an abrupt completion, perform ! Call(_promiseCapability_.[[Reject]], *undefined*, &laquo; _namespace_.[[Value]] &raquo;).
1. Else, perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, &laquo; _namespace_.[[Value]] &raquo;).
</emu-alg>

<p>A CallDynamicImportRejected function is an anonymous built-in function with no internal slots and has one argument _error_. When a CallDynamicImportRejected function is called it performs the following steps:</p>
<p>A CallDynamicImportRejected function is an anonymous built-in function with one internal slot [[PromiseCapability]] and has one argument _error_. When a CallDynamicImportRejected function is called it performs the following steps:</p>
<emu-alg>
1. Let _promiseCapability_ be *undefined*.
1. Let _F_ be the active function object.
1. Let _promiseCapability_ be _F_.[[PromiseCapability]].
1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, &laquo; _error_ &raquo;).
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit d881b00

Please sign in to comment.