?
u
/
See the explainer for information.
This proposal is buit on top of the Import Attributes proposal.
The
An example of when referrer can be a
<button type="button" onclick="import('./foo.mjs')">Click me</button>
there will be no import()
An implementation of HostLoadImportedModule must conform to the following requirements:
If this operation is called multiple times with two (referrer, moduleRequest) pairs such that:
then it must perform
If moduleRequest.[[Attributes]] has an entry entry such that entry.[[Key]] is
The actual process performed is
The above text implies that type: "json"
(if it completes normally), but it doesn't prohibit with { type: "json" }
, and environments which want to restrict themselves to a compatible subset would do so as well.
All of the import statements in the module graph that address the same JSON module may evaluate to the same mutable object.
A Synthetic Module Record is used to represent information about a module that is defined by specifications. Its exports are derived from a pair of lists, of string keys and of ECMAScript values. The set of exported names is static, and determined at creation time (as an argument to
In addition to the fields defined in
Field Name | Value Type | Meaning |
---|---|---|
[[ExportNames]] | A |
|
[[EvaluationSteps]] | An |
An |
The abstract operation CreateSyntheticModule takes arguments exportNames (a
The abstract operation SetSyntheticModuleExport takes arguments module (a
The following are the concrete methods for
The LoadRequestedModules concrete method of a
The GetExportedNames concrete method of a
The ResolveExport concrete method of a
The Link concrete method of a
The Evaluate concrete method of a
The abstract operation CreateDefaultExportSyntheticModule takes argument defaultExport (an ECMAScript Language value) and returns a
The abstract operation ParseJSONModule takes argument source (a String) and returns either a