?
u
/
Intrinsic Name | Global Name | ECMAScript Language Association |
---|---|---|
ModuleSource |
The ModuleSource |
|
Module |
The Module |
In addition to the fields defined in
Field Name | Value Type | Meaning |
---|---|---|
[[Status]] | ||
[[EvaluationError]] | ||
[[DFSIndex]] | ||
[[DFSAncestorIndex]] | ||
[[RequestedModules]] | ||
[[LoadedModules]] |
a |
A map from the specifier strings used by the module represented by this record to request the importation of a module to the resolved |
[[LoadingModules]] |
a |
A map from the specifier strings imported by this module to the states of the loading processes that are waiting for the resolved module record. It is used to avoid multiple calls to the loading hook with the same (specifier, referrer) pair. The list does not contain two different
This field must also be added to |
[[CycleRoot]] | ||
[[HasTLA]] | ||
[[AsyncEvaluation]] | ||
[[TopLevelCapability]] | ||
[[AsyncParentModules]] | ||
[[PendingAsyncDependencies]] |
The LoadRequestedModules concrete method of a
The abstract operation InnerModuleLoading takes arguments state (a GraphLoadingState
In addition to the fields defined in
Field Name | Value Type | Meaning |
---|---|---|
... | ||
[[ModuleInstance]] |
An instance of a |
A Module Instance or |
The abstract operation LoadImportedModule takes arguments referrer (a
The payload (a GraphLoadingState and returns
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:
The actual process performed is
The abstract operation FinishLoadingImportedModule takes arguments referrer (a payload (a GraphLoadingState , and result (either a
A Module Source Record is used to represent information about a module source that was defined from
Field Name | Value Type | Meaning |
---|---|---|
[[ECMAScriptCode]] |
a |
The result of parsing the source text of this module using |
[[ImportEntries]] |
a |
A |
[[LocalExportEntries]] |
a |
A |
[[IndirectExportEntries]] |
a |
A export * as namespace declarations.
|
[[StarExportEntries]] |
a |
A export * declarations that occur within the module, not including export * as namespace declarations.
|
[[HasTLA]] | a Boolean |
Whether this module source is individually asynchronous. Having an asynchronous dependency does not mean this field is |
[[RequestedModules]] |
a |
A |
[[HostDefined]] |
anything (default value is |
Field reserved for use by |
The abstract operation CreateModuleSourceRecord takes argument body (
await
.The ModuleSource
When the ModuleSource
function is called with argument sourceText, the following steps are taken:
The ModuleSource
The initial value of
This property has the attributes { [[Writable]]:
The ModuleSource prototype object:
The initial value of ModuleSource.prototype.constructor
is
The initial value of the
This property has the attributes { [[Writable]]:
ModuleSource instances are
Internal Slot | Type | Description |
---|---|---|
[[ModuleSource]] | The |
The abstract operation CreateModuleRecord takes argument moduleSource (a
The Module
When the Module
function is called with the arguments moduleSource and handler, the following steps are taken:
The Module
The initial value of
This property has the attributes { [[Writable]]:
The Module prototype object:
The initial value of Module.prototype.constructor
is
Module.prototype.source
is an
The initial value of the
This property has the attributes { [[Writable]]:
Module instances are
Internal Slot | Type | Description |
---|---|---|
[[Module]] | The |
|
[[ModuleSourceInstance]] | ModuleSource Instance or |
The ModuleSource Instance associated to Module Instance. |
[[HandlerValue]] | an |
This is the |
[[ImportHook]] | a |
Defaults to |
[[ImportMetaHook]] | a |
Defaults to import.meta object provided as the first argument. |
fs
module or any built-in module in the future.