diff --git a/spec.html b/spec.html index 3dc99bc2c3..3744976bdc 100644 --- a/spec.html +++ b/spec.html @@ -3280,6 +3280,17 @@

Well-Known Intrinsic Objects

+ + + %AbstractModuleSource% + + + `AbstractModuleSource` + + + The `AbstractModuleSource` constructor () + + %AggregateError% @@ -7418,11 +7429,11 @@

Static Semantics: BoundNames ( ): a List of Strings

1. Let _head_ be the |AsyncArrowHead| that is covered by |CoverCallExpressionAndAsyncArrowHead|. 1. Return the BoundNames of _head_. - ImportDeclaration : `import` ImportClause FromClause `;` + ImportDeclaration : `import` ImportClause FromClause WithClause? `;` 1. Return the BoundNames of |ImportClause|. - ImportDeclaration : `import` ModuleSpecifier `;` + ImportDeclaration : `import` ModuleSpecifier WithClause? `;` 1. Return a new empty List. @@ -7454,7 +7465,7 @@

Static Semantics: BoundNames ( ): a List of Strings

ExportDeclaration : - `export` ExportFromClause FromClause `;` + `export` ExportFromClause FromClause WithClause? `;` `export` NamedExports `;` @@ -7812,7 +7823,7 @@

Static Semantics: LexicallyScopedDeclarations ( ): a List of Parse Nodes

ExportDeclaration : - `export` ExportFromClause FromClause `;` + `export` ExportFromClause FromClause WithClause? `;` `export` NamedExports `;` `export` VariableStatement @@ -9915,11 +9926,19 @@

Static Semantics: PropName ( ): a String or ~empty~

1. Return the PropName of |PropertyName|. - LiteralPropertyName : IdentifierName + + LiteralPropertyName : IdentifierName + + AttributeKey : IdentifierName + 1. Return the StringValue of |IdentifierName|. - LiteralPropertyName : StringLiteral + + LiteralPropertyName : StringLiteral + + AttributeKey : StringLiteral + 1. Return the SV of |StringLiteral|. @@ -11667,10 +11686,10 @@

Realms

[[LoadedModules]] - a List of Records with fields [[Specifier]] (a String) and [[Module]] (a Module Record) + a List of LoadedModuleRequest Records -

A map from the specifier strings imported by this realm to the resolved Module Record. The list does not contain two different Records with the same [[Specifier]].

+

A map from the specifier strings imported by this realm to the resolved Module Record. The list does not contain two different Records _r1_ and _r2_ such that ModuleRequestsEqual(_r1_, _r2_) is *true*.

As mentioned in HostLoadImportedModule (), [[LoadedModules]] in Realm Records is only used when running an `import()` expression in a context where there is no active script or module. @@ -19047,7 +19066,10 @@

Syntax

`super` Arguments[?Yield, ?Await] ImportCall[Yield, Await] : - `import` `(` AssignmentExpression[+In, ?Yield, ?Await] `)` + `import` `(` AssignmentExpression[+In, ?Yield, ?Await] `,`? `)` + `import` `(` AssignmentExpression[+In, ?Yield, ?Await] `,` AssignmentExpression[+In, ?Yield, ?Await] `,`? `)` + `import` `.` `source` `(` AssignmentExpression[+In, ?Yield, ?Await] `,`? `)` + `import` `.` `source` `(` AssignmentExpression[+In, ?Yield, ?Await] `,` AssignmentExpression[+In, ?Yield, ?Await] `,`? `)` Arguments[Yield, Await] : `(` `)` @@ -19606,58 +19628,127 @@

Import Calls

Runtime Semantics: Evaluation

- ImportCall : `import` `(` AssignmentExpression `)` + ImportCall : `import` `(` AssignmentExpression `,`? `)` + + 1. Return ? EvaluateImportCall(|AssignmentExpression|, ~evaluation~). + + + ImportCall : `import` `(` AssignmentExpression `,` AssignmentExpression `,`? `)` + + 1. Return ? EvaluateImportCall(the first |AssignmentExpression|, ~evaluation~, the second |AssignmentExpression|). + + + ImportCall : `import` `.` `source` `(` AssignmentExpression `,` AssignmentExpression `,`? `)` + + 1. Return ? EvaluateImportCall(|AssignmentExpression|, ~source~). + + + ImportCall : `import` `.` `source` `(` AssignmentExpression `,` AssignmentExpression `,`? `)` + + 1. Return ? EvaluateImportCall(the first |AssignmentExpression|, ~source~, the second |AssignmentExpression|). + +
+ + +

+ EvaluateImportCall ( + _specifierExpression_: a Parse Node, + _phase_: ~source~ or ~evaluation~, + optional _optionsExpression_: a Parse Node, + ): either a normal completion containing a Promise or a throw completion +

+
+
1. Let _referrer_ be GetActiveScriptOrModule(). 1. If _referrer_ is *null*, set _referrer_ to the current Realm Record. - 1. Let _argRef_ be ? Evaluation of |AssignmentExpression|. - 1. Let _specifier_ be ? GetValue(_argRef_). + 1. Let _specifierRef_ be ? Evaluation of _specifierExpression_. + 1. Let _specifier_ be ? GetValue(_specifierRef_). + 1. If _optionsExpression_ is present, then + 1. Let _optionsRef_ be ? Evaluation of _optionsExpression_. + 1. Let _options_ be ? GetValue(_optionsRef_). + 1. Else, + 1. Let _options_ be *undefined*. 1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%). 1. Let _specifierString_ be Completion(ToString(_specifier_)). 1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_). - 1. Perform HostLoadImportedModule(_referrer_, _specifierString_, ~empty~, _promiseCapability_). + 1. Let _attributes_ be a new empty List. + 1. If _options_ is not *undefined*, then + 1. If _options_ is not an Object, then + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). + 1. Return _promiseCapability_.[[Promise]]. + 1. Let _attributesObj_ be Completion(Get(_options_, *"with"*)). + 1. IfAbruptRejectPromise(_attributesObj_, _promiseCapability_). + 1. If _attributesObj_ is not *undefined*, then + 1. If _attributesObj_ is not an Object, then + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). + 1. Return _promiseCapability_.[[Promise]]. + 1. Let _entries_ be Completion(EnumerableOwnProperties(_attributesObj_, ~key+value~)). + 1. IfAbruptRejectPromise(_entries_, _promiseCapability_). + 1. For each element _entry_ of _entries_, do + 1. Let _key_ be ! Get(_entry_, *"0"*). + 1. Let _value_ be ! Get(_entry_, *"1"*). + 1. If _key_ is a String, then + 1. If _value_ is not a String, then + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). + 1. Return _promiseCapability_.[[Promise]]. + 1. Append the ImportAttribute Record { [[Key]]: _key_, [[Value]]: _value_ } to _attributes_. + 1. If AllImportAttributesSupported(_attributes_) is *false*, then + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a newly created *TypeError* object »). + 1. Return _promiseCapability_.[[Promise]]. + 1. Sort _attributes_ according to the lexicographic order of their [[Key]] fields, treating the value of each such field as a sequence of UTF-16 code unit values. NOTE: This sorting is observable only in that hosts are prohibited from changing behaviour based on the order in which attributes are enumerated. + 1. Let _moduleRequest_ be a new ModuleRequest Record { [[Specifier]]: _specifierString_, [[Phase]]: _phase_, [[Attributes]]: _attributes_ }. + 1. Perform HostLoadImportedModule(_referrer_, _moduleRequest_, ~empty~, _promiseCapability_). 1. Return _promiseCapability_.[[Promise]]. +
- -

- ContinueDynamicImport ( - _promiseCapability_: a PromiseCapability Record, - _moduleCompletion_: either a normal completion containing a Module Record or a throw completion, - ): ~unused~ -

-
-
description
-
It completes the process of a dynamic import originally started by an `import()` call, resolving or rejecting the promise returned by that call as appropriate.
-
- - 1. If _moduleCompletion_ is an abrupt completion, then - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _moduleCompletion_.[[Value]] »). - 1. Return ~unused~. - 1. Let _module_ be _moduleCompletion_.[[Value]]. - 1. Let _loadPromise_ be _module_.LoadRequestedModules(). - 1. Let _rejectedClosure_ be a new Abstract Closure with parameters (_reason_) that captures _promiseCapability_ and performs the following steps when called: - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _reason_ »). + +

+ ContinueDynamicImport ( + _promiseCapability_: a PromiseCapability Record, + _phase_: ~source~ or ~evaluation~, + _moduleCompletion_: either a normal completion containing a Module Record or a throw completion, + ): ~unused~ +

+
+
description
+
It completes the process of a dynamic import originally started by an `import()` call, resolving or rejecting the promise returned by that call as appropriate.
+
+ + 1. If _moduleCompletion_ is an abrupt completion, then + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _moduleCompletion_.[[Value]] »). + 1. Return ~unused~. + 1. Let _module_ be _moduleCompletion_.[[Value]]. + 1. If _phase_ is ~source~, then + 1. Let _moduleSource_ be _module_.[[ModuleSource]]. + 1. If _moduleSource_ is ~empty~, then + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « a new *SyntaxError* »). + 1. Else, + 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _moduleSource_ »). + 1. Return ~unused~. + 1. Let _loadPromise_ be _module_.LoadRequestedModules(). + 1. Let _rejectedClosure_ be a new Abstract Closure with parameters (_reason_) that captures _promiseCapability_ and performs the following steps when called: + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _reason_ »). + 1. Return ~unused~. + 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 1, *""*, « »). + 1. Let _linkAndEvaluateClosure_ be a new Abstract Closure with no parameters that captures _module_, _promiseCapability_, and _onRejected_ and performs the following steps when called: + 1. Let _link_ be Completion(_module_.Link()). + 1. If _link_ is an abrupt completion, then + 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _link_.[[Value]] »). 1. Return ~unused~. - 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 1, *""*, « »). - 1. Let _linkAndEvaluateClosure_ be a new Abstract Closure with no parameters that captures _module_, _promiseCapability_, and _onRejected_ and performs the following steps when called: - 1. Let _link_ be Completion(_module_.Link()). - 1. If _link_ is an abrupt completion, then - 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _link_.[[Value]] »). - 1. Return ~unused~. - 1. Let _evaluatePromise_ be _module_.Evaluate(). - 1. Let _fulfilledClosure_ be a new Abstract Closure with no parameters that captures _module_ and _promiseCapability_ and performs the following steps when called: - 1. Let _namespace_ be GetModuleNamespace(_module_). - 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _namespace_ »). - 1. Return ~unused~. - 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 0, *""*, « »). - 1. Perform PerformPromiseThen(_evaluatePromise_, _onFulfilled_, _onRejected_). + 1. Let _evaluatePromise_ be _module_.Evaluate(). + 1. Let _fulfilledClosure_ be a new Abstract Closure with no parameters that captures _module_ and _promiseCapability_ and performs the following steps when called: + 1. Let _namespace_ be GetModuleNamespace(_module_). + 1. Perform ! Call(_promiseCapability_.[[Resolve]], *undefined*, « _namespace_ »). 1. Return ~unused~. - 1. Let _linkAndEvaluate_ be CreateBuiltinFunction(_linkAndEvaluateClosure_, 0, *""*, « »). - 1. Perform PerformPromiseThen(_loadPromise_, _linkAndEvaluate_, _onRejected_). + 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 0, *""*, « »). + 1. Perform PerformPromiseThen(_evaluatePromise_, _onFulfilled_, _onRejected_). 1. Return ~unused~. - -
+ 1. Let _linkAndEvaluate_ be CreateBuiltinFunction(_linkAndEvaluateClosure_, 0, *""*, « »). + 1. Perform PerformPromiseThen(_loadPromise_, _linkAndEvaluate_, _onRejected_). + 1. Return ~unused~. +
@@ -25929,10 +26020,10 @@

Script Records

[[LoadedModules]] - a List of Records with fields [[Specifier]] (a String) and [[Module]] (a Module Record) + a List of LoadedModuleRequest Records - A map from the specifier strings imported by this script to the resolved Module Record. The list does not contain two different Records with the same [[Specifier]]. + A map from the specifier strings imported by this script to the resolved Module Record. The list does not contain two different Records _r1_ and _r2_ such that ModuleRequestsEqual(_r1_, _r2_) is *true*. @@ -26173,8 +26264,184 @@

+ +

ModuleRequest Records

+ +

A ModuleRequest Record represents the request to import a module with given import attributes. It consists of the following fields:

+ + + + + + + + + + + + + + + + + + + + + + +
+ Field Name + + Value Type + + Meaning +
+ [[Specifier]] + + a String + + The module specifier +
+ [[Phase]] + + ~source~ or ~evaluation~ + + The target import phase +
+ [[Attributes]] + + a List of ImportAttribute Records + + The import attributes +
+
+ +

A LoadedModuleRequest Record represents the request to import a module together with the resulting Module Record. It consists of the [[Specifier]] and [[Attributes]] fields defined in table , with the addition of [[Module]]:

+ + + + + + + + + + + + + + + + + + + + + + +
+ Field Name + + Value Type + + Meaning +
+ [[Specifier]] + + a String + + The module specifier +
+ [[Attributes]] + + a List of ImportAttribute Records + + The import attributes +
+ [[Module]] + + a Module Record + + The loaded module corresponding to this module request +
+
+ +

An ImportAttribute Record consists of the following fields:

+ + + + + + + + + + + + + + + + + +
+ Field Name + + Value Type + + Meaning +
+ [[Key]] + + a String + + The attribute key +
+ [[Value]] + + a String + + The attribute value +
+
+ + +

+ ModuleRequestsEqual ( + _left_: a ModuleRequest Record or a LoadedModuleRequest Record, + _right_: a ModuleRequest Record or a LoadedModuleRequest Record, + ): a Boolean +

+
+
description
+
+
+ + + 1. If _left_.[[Specifier]] is not _right_.[[Specifier]], return *false*. + 1. Let _leftAttrs_ be _left_.[[Attributes]]. + 1. Let _rightAttrs_ be _right_.[[Attributes]]. + 1. Let _leftAttrsCount_ be the number of elements in _leftAttrs_. + 1. Let _rightAttrsCount_ be the number of elements in _rightAttrs_. + 1. If _leftAttrsCount_ ≠ _rightAttrsCount_, return *false*. + 1. For each ImportAttribute Record _l_ of _leftAttrs_, do + 1. Let _found_ be *false*. + 1. For each ImportAttribute Record _r_ of _rightAttrs_, do + 1. If _l_.[[Key]] is _r_.[[Key]], then + 1. If _l_.[[Value]] is _r_.[[Value]], then + 1. Assert: _found_ is *false*. + 1. Set _found_ to *true*. + 1. Else, + 1. Return *false*. + 1. If _found_ is *false*, return *false*. + 1. Return *true*. + +
+
+ -

Static Semantics: ModuleRequests ( ): a List of Strings

+

Static Semantics: ModuleRequests ( ): a List of ModuleRequest Records

Module : [empty] @@ -26187,12 +26454,12 @@

Static Semantics: ModuleRequests ( ): a List of Strings

ModuleItemList : ModuleItemList ModuleItem - 1. Let _moduleNames_ be the ModuleRequests of |ModuleItemList|. - 1. Let _additionalNames_ be the ModuleRequests of |ModuleItem|. - 1. For each String _name_ of _additionalNames_, do - 1. If _moduleNames_ does not contain _name_, then - 1. Append _name_ to _moduleNames_. - 1. Return _moduleNames_. + 1. Let _requests_ be the ModuleRequests of |ModuleItemList|. + 1. Let _additionalRequests_ be the ModuleRequests of |ModuleItem|. + 1. For each ModuleRequest Record _mr_ of _additionalRequests_, do + 1. If _requests_ does not contain a ModuleRequest Record _mr2_ such that ModuleRequestsEqual(_mr_, _mr2_) is *true*, then + 1. Append _mr_ to _requests_. + 1. Return _requests_. ModuleItem : StatementListItem @@ -26200,17 +26467,51 @@

Static Semantics: ModuleRequests ( ): a List of Strings

ImportDeclaration : `import` ImportClause FromClause `;` - 1. Return the ModuleRequests of |FromClause|. + 1. Let _specifier_ be the SV of |FromClause|. + 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Phase]]: ~evaluation~, [[Attributes]]: « » }. - ModuleSpecifier : StringLiteral + ImportDeclaration : `import` ImportClause FromClause WithClause `;` - 1. Return a List whose sole element is the SV of |StringLiteral|. + 1. Let _specifier_ be the SV of |FromClause|. + 1. Let _attributes_ be WithClauseToAttributes of |WithClause|. + 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Phase]]: ~evaluation~, [[Attributes]]: _attributes_ }. + + ImportDeclaration : `import` `source` ImportedBinding FromClause `;` + + 1. Let _specifier_ be the SV of |FromClause|. + 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Phase]]: ~source~, [[Attributes]]: « » }. + + ImportDeclaration : `import` `source` ImportedBinding FromClause WithClause `;` + + 1. Let _specifier_ be the SV of |FromClause|. + 1. Let _attributes_ be WithClauseToAttributes of |WithClause|. + 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Phase]]: ~source~, [[Attributes]]: _attributes_ }. + + ImportDeclaration : `import` ModuleSpecifier `;` + + 1. Let _specifier_ be the SV of |ModuleSpecifier|. + 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Phase]]: ~evaluation~, [[Attributes]]: « » }. + + ImportDeclaration : `import` ModuleSpecifier WithClause `;` + + 1. Let _specifier_ be the SV of |ModuleSpecifier|. + 1. Let _attributes_ be WithClauseToAttributes of |WithClause|. + 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Phase]]: ~evaluation~, [[Attributes]]: _attributes_ }. ExportDeclaration : `export` ExportFromClause FromClause `;` - 1. Return the ModuleRequests of |FromClause|. + 1. Let _specifier_ be the SV of |FromClause|. + 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Phase]]: ~evaluation~, [[Attributes]]: « » }. + + + ExportDeclaration : `export` ExportFromClause FromClause WithClause `;` + + + 1. Let _specifier_ be the SV of |FromClause|. + 1. Let _attributes_ be WithClauseToAttributes of |WithClause|. + 1. Return a List whose sole element is the ModuleRequest Record { [[Specifier]]: _specifier_, [[Phase]]: ~evaluation~, [[Attributes]]: _attributes_ }. ExportDeclaration : @@ -26279,6 +26580,17 @@

Abstract Module Records

The Module Namespace Object () if one has been created for this module. + + + [[ModuleSource]] + + + an Object or ~empty~ + + + The Module Source Object corresponding to this source Module Record's source phase (), or ~empty~ if it is not available for this module kind. When set, it must have a [[Prototype]] internal slot containing an object whose initial [[Prototype]] is %AbstractModuleSource%. + + [[HostDefined]] @@ -26421,10 +26733,10 @@

Cyclic Module Records

[[RequestedModules]] - a List of Strings + a List of ModuleRequest Records - A List of all the |ModuleSpecifier| strings used by the module represented by this record to request the importation of a module. The List is in source text occurrence order. + A List of the ModuleRequest Records associated with the imports in this module, along with their associated phase (~source~ or ~evaluation~). The List is in source text occurrence order of the imports. @@ -26432,10 +26744,10 @@

Cyclic Module Records

[[LoadedModules]] - a List of Records with fields [[Specifier]] (a String) and [[Module]] (a Module Record) + a List of LoadedModuleRequest Records - A map from the specifier strings used by the module represented by this record to request the importation of a module to the resolved Module Record. The list does not contain two different Records with the same [[Specifier]]. + A map from the specifier strings used by the module represented by this record to request the importation of a module with the relative import attributes to the resolved Module Record. The list does not contain two different Records _r1_ and _r2_ such that ModuleRequestsEqual(_r1_, _r2_) is *true*. @@ -26630,7 +26942,7 @@

1. If _hostDefined_ is not present, let _hostDefined_ be ~empty~. 1. Let _pc_ be ! NewPromiseCapability(%Promise%). 1. Let _state_ be the GraphLoadingState Record { [[IsLoading]]: *true*, [[PendingModulesCount]]: 1, [[Visited]]: « », [[PromiseCapability]]: _pc_, [[HostDefined]]: _hostDefined_ }. - 1. Perform InnerModuleLoading(_state_, _module_). + 1. Perform InnerModuleLoading(_state_, _module_, ~recursive-load~). 1. Return _pc_.[[Promise]]. @@ -26644,6 +26956,7 @@

InnerModuleLoading ( _state_: a GraphLoadingState Record, _module_: a Module Record, + _loadType_: ~single~ or ~recursive-load~, ): ~unused~

@@ -26653,16 +26966,19 @@

1. Assert: _state_.[[IsLoading]] is *true*. - 1. If _module_ is a Cyclic Module Record, _module_.[[Status]] is ~new~, and _state_.[[Visited]] does not contain _module_, then + 1. If _loadType_ is ~recursive-load~, _module_ is a Cyclic Module Record, _module_.[[Status]] is ~new~, and _state_.[[Visited]] does not contain _module_, then 1. Append _module_ to _state_.[[Visited]]. 1. Let _requestedModulesCount_ be the number of elements in _module_.[[RequestedModules]]. 1. Set _state_.[[PendingModulesCount]] to _state_.[[PendingModulesCount]] + _requestedModulesCount_. - 1. For each String _required_ of _module_.[[RequestedModules]], do - 1. If _module_.[[LoadedModules]] contains a Record whose [[Specifier]] is _required_, then - 1. Let _record_ be that Record. - 1. Perform InnerModuleLoading(_state_, _record_.[[Module]]). + 1. For each ModuleRequest Record _request_ of _module_.[[RequestedModules]], do + 1. If AllImportAttributesSupported(_request_.[[Attributes]]) is *false*, then + 1. Let _error_ be ThrowCompletion(a newly created *SyntaxError* object). + 1. Perform ContinueModuleLoading(_state_, _request_.[[Phase]], _error_). + 1. Else if _module_.[[LoadedModules]] contains a LoadedModuleRequest Record _record_ such that ModuleRequestsEqual(_record_, _request_) is *true*, then + 1. If _request_.[[Phase]] is ~source~, let _innerLoadType_ be ~single~; otherwise let _innerLoadType_ be ~recursive-load~. + 1. Perform InnerModuleLoading(_state_, _record_.[[Module]], _innerLoadType_). 1. Else, - 1. Perform HostLoadImportedModule(_module_, _required_, _state_.[[HostDefined]], _state_). + 1. Perform HostLoadImportedModule(_module_, _request_, _state_.[[HostDefined]], _state_). 1. NOTE: HostLoadImportedModule will call FinishLoadingImportedModule, which re-enters the graph loading process through ContinueModuleLoading. 1. If _state_.[[IsLoading]] is *false*, return ~unused~. 1. Assert: _state_.[[PendingModulesCount]] ≥ 1. @@ -26680,6 +26996,7 @@

ContinueModuleLoading ( _state_: a GraphLoadingState Record, + _phase_: ~source~ or ~evaluation~, _moduleCompletion_: either a normal completion containing a Module Record or a throw completion, ): ~unused~

@@ -26691,7 +27008,8 @@

1. If _state_.[[IsLoading]] is *false*, return ~unused~. 1. If _moduleCompletion_ is a normal completion, then - 1. Perform InnerModuleLoading(_state_, _moduleCompletion_.[[Value]]). + 1. If _phase_ is ~source~, let _loadType_ be ~single~; otherwise let _loadType_ be ~recursive-load~. + 1. Perform InnerModuleLoading(_state_, _moduleCompletion_.[[Value]], _loadType_). 1. Else, 1. Set _state_.[[IsLoading]] to *false*. 1. Perform ! Call(_state_.[[PromiseCapability]].[[Reject]], *undefined*, « _moduleCompletion_.[[Value]] »). @@ -26750,14 +27068,15 @@

1. Set _module_.[[DFSAncestorIndex]] to _index_. 1. Set _index_ to _index_ + 1. 1. Append _module_ to _stack_. - 1. For each String _required_ of _module_.[[RequestedModules]], do - 1. Let _requiredModule_ be GetImportedModule(_module_, _required_). - 1. Set _index_ to ? InnerModuleLinking(_requiredModule_, _stack_, _index_). - 1. If _requiredModule_ is a Cyclic Module Record, then - 1. Assert: _requiredModule_.[[Status]] is one of ~linking~, ~linked~, ~evaluating-async~, or ~evaluated~. - 1. Assert: _requiredModule_.[[Status]] is ~linking~ if and only if _stack_ contains _requiredModule_. - 1. If _requiredModule_.[[Status]] is ~linking~, then - 1. Set _module_.[[DFSAncestorIndex]] to min(_module_.[[DFSAncestorIndex]], _requiredModule_.[[DFSAncestorIndex]]). + 1. For each ModuleRequest Record _request_ of _module_.[[RequestedModules]], do + 1. If _request_.[[Phase]] is ~evaluation~, then + 1. Let _requiredModule_ be GetImportedModule(_module_, _request_). + 1. Set _index_ to ? InnerModuleLinking(_requiredModule_, _stack_, _index_). + 1. If _requiredModule_ is a Cyclic Module Record, then + 1. Assert: _requiredModule_.[[Status]] is one of ~linking~, ~linked~, ~evaluating-async~, or ~evaluated~. + 1. Assert: _requiredModule_.[[Status]] is ~linking~ if and only if _stack_ contains _requiredModule_. + 1. If _requiredModule_.[[Status]] is ~linking~, then + 1. Set _module_.[[DFSAncestorIndex]] to min(_module_.[[DFSAncestorIndex]], _requiredModule_.[[DFSAncestorIndex]]). 1. Perform ? _module_.InitializeEnvironment(). 1. Assert: _module_ occurs exactly once in _stack_. 1. Assert: _module_.[[DFSAncestorIndex]] ≤ _module_.[[DFSIndex]]. @@ -26843,21 +27162,22 @@

1. Set _module_.[[PendingAsyncDependencies]] to 0. 1. Set _index_ to _index_ + 1. 1. Append _module_ to _stack_. - 1. For each String _required_ of _module_.[[RequestedModules]], do - 1. Let _requiredModule_ be GetImportedModule(_module_, _required_). - 1. Set _index_ to ? InnerModuleEvaluation(_requiredModule_, _stack_, _index_). - 1. If _requiredModule_ is a Cyclic Module Record, then - 1. Assert: _requiredModule_.[[Status]] is one of ~evaluating~, ~evaluating-async~, or ~evaluated~. - 1. Assert: _requiredModule_.[[Status]] is ~evaluating~ if and only if _stack_ contains _requiredModule_. - 1. If _requiredModule_.[[Status]] is ~evaluating~, then - 1. Set _module_.[[DFSAncestorIndex]] to min(_module_.[[DFSAncestorIndex]], _requiredModule_.[[DFSAncestorIndex]]). - 1. Else, - 1. Set _requiredModule_ to _requiredModule_.[[CycleRoot]]. - 1. Assert: _requiredModule_.[[Status]] is either ~evaluating-async~ or ~evaluated~. - 1. If _requiredModule_.[[EvaluationError]] is not ~empty~, return ? _requiredModule_.[[EvaluationError]]. - 1. If _requiredModule_.[[AsyncEvaluation]] is *true*, then - 1. Set _module_.[[PendingAsyncDependencies]] to _module_.[[PendingAsyncDependencies]] + 1. - 1. Append _module_ to _requiredModule_.[[AsyncParentModules]]. + 1. For each ModuleRequest Record _request_ of _module_.[[RequestedModules]], do + 1. If _request_.[[Phase]] is ~evaluation~, then + 1. Let _requiredModule_ be GetImportedModule(_module_, _request_). + 1. Set _index_ to ? InnerModuleEvaluation(_requiredModule_, _stack_, _index_). + 1. If _requiredModule_ is a Cyclic Module Record, then + 1. Assert: _requiredModule_.[[Status]] is one of ~evaluating~, ~evaluating-async~, or ~evaluated~. + 1. Assert: _requiredModule_.[[Status]] is ~evaluating~ if and only if _stack_ contains _requiredModule_. + 1. If _requiredModule_.[[Status]] is ~evaluating~, then + 1. Set _module_.[[DFSAncestorIndex]] to min(_module_.[[DFSAncestorIndex]], _requiredModule_.[[DFSAncestorIndex]]). + 1. Else, + 1. Set _requiredModule_ to _requiredModule_.[[CycleRoot]]. + 1. Assert: _requiredModule_.[[Status]] is either ~evaluating-async~ or ~evaluated~. + 1. If _requiredModule_.[[EvaluationError]] is not ~empty~, return ? _requiredModule_.[[EvaluationError]]. + 1. If _requiredModule_.[[AsyncEvaluation]] is *true*, then + 1. Set _module_.[[PendingAsyncDependencies]] to _module_.[[PendingAsyncDependencies]] + 1. + 1. Append _module_ to _requiredModule_.[[AsyncParentModules]]. 1. If _module_.[[PendingAsyncDependencies]] > 0 or _module_.[[HasTLA]] is *true*, then 1. Assert: _module_.[[AsyncEvaluation]] is *false* and was never previously set to *true*. 1. Set _module_.[[AsyncEvaluation]] to *true*. @@ -27623,10 +27943,10 @@

Source Text Module Records

[[ModuleRequest]] - a String + a ModuleRequest Record - String value of the |ModuleSpecifier| of the |ImportDeclaration|. + ModuleRequest Record representing the |ModuleSpecifier| and import attributes of the |ImportDeclaration|. @@ -27634,10 +27954,10 @@

Source Text Module Records

[[ImportName]] - a String or ~namespace-object~ + a String, ~namespace-object~ or ~source~ - The name under which the desired binding is exported by the module identified by [[ModuleRequest]]. The value ~namespace-object~ indicates that the import request is for the target module's namespace object. + The name under which the desired binding is exported by the module identified by [[ModuleRequest]]. The value ~namespace-object~ indicates that the import request is for the target module's namespace object. The value ~source~ represents an import at the source phase. @@ -27772,10 +28092,10 @@

Source Text Module Records

[[ModuleRequest]] - a String or *null* + a ModuleRequest Record or *null* - The String value of the |ModuleSpecifier| of the |ExportDeclaration|. *null* if the |ExportDeclaration| does not have a |ModuleSpecifier|. + The ModuleRequest Record representing the |ModuleSpecifier| and import attributes of the |ExportDeclaration|. *null* if the |ExportDeclaration| does not have a |ModuleSpecifier|. @@ -28175,6 +28495,11 @@

InitializeEnvironment ( ): either a normal completion containing ~unused~ or 1. Let _namespace_ be GetModuleNamespace(_importedModule_). 1. Perform ! _env_.CreateImmutableBinding(_in_.[[LocalName]], *true*). 1. Perform ! _env_.InitializeBinding(_in_.[[LocalName]], _namespace_). + 1. Else if _in_.[[ImportName]] is ~source~, then + 1. Let _moduleSourceObject_ be _importedModule_.[[ModuleSource]]. + 1. If _moduleSourceObject_ is ~empty~, throw a *SyntaxError* exception. + 1. Perform ! _env_.CreateImmutableBinding(_in_.[[LocalName]], *true*). + 1. Perform ! _env_.InitializeBinding(_in_.[[LocalName]], _moduleSourceObject_). 1. Else, 1. Let _resolution_ be _importedModule_.ResolveExport(_in_.[[ImportName]]). 1. If _resolution_ is either *null* or ~ambiguous~, throw a *SyntaxError* exception. @@ -28259,7 +28584,7 @@

GetImportedModule ( _referrer_: a Cyclic Module Record, - _specifier_: a String, + _request_: a ModuleRequest Record, ): a Module Record

@@ -28268,8 +28593,9 @@

- 1. Assert: Exactly one element of _referrer_.[[LoadedModules]] is a Record whose [[Specifier]] is _specifier_, since LoadRequestedModules has completed successfully on _referrer_ prior to invoking this abstract operation. - 1. Let _record_ be the Record in _referrer_.[[LoadedModules]] whose [[Specifier]] is _specifier_. + 1. [declared="r"] Let _records_ be a List consisting of each LoadedModuleRequest Record _r_ of _referrer_.[[LoadedModules]] such that ModuleRequestsEqual(_r_, _request_) is *true*. + 1. Assert: _records_ has exactly one element, since LoadRequestedModules has completed successfully on _referrer_ prior to invoking this abstract operation. + 1. Let _record_ be the sole element of _records_. 1. Return _record_.[[Module]]. @@ -28278,7 +28604,7 @@

HostLoadImportedModule ( _referrer_: a Script Record, a Cyclic Module Record, or a Realm Record, - _specifier_: a String, + _moduleRequest_: a ModuleRequest Record, _hostDefined_: anything, _payload_: a GraphLoadingState Record or a PromiseCapability Record, ): ~unused~ @@ -28299,24 +28625,36 @@

An implementation of HostLoadImportedModule must conform to the following requirements:

  • - The host environment must perform FinishLoadingImportedModule(_referrer_, _specifier_, _payload_, _result_), where _result_ is either a normal completion containing the loaded Module Record or a throw completion, either synchronously or asynchronously. + The host environment must perform FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_), where _result_ is either a normal completion containing the loaded Module Record or a throw completion, either synchronously or asynchronously.
  • - If this operation is called multiple times with the same (_referrer_, _specifier_) pair and it performs FinishLoadingImportedModule(_referrer_, _specifier_, _payload_, _result_) where _result_ is a normal completion, then it must perform FinishLoadingImportedModule(_referrer_, _specifier_, _payload_, _result_) with the same _result_ each time. +

    If this operation is called multiple times with two (_referrer_, _moduleRequest_) pairs such that:

    +
      +
    • the first _referrer_ is the same as the second _referrer_;
    • +
    • ModuleRequestsEqual(the first _moduleRequest_, the second _moduleRequest_) is *true*;
    • +
    +

    and it performs FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_) where _result_ is a normal completion, then it must perform FinishLoadingImportedModule(_referrer_, _moduleRequest_, _payload_, _result_) with the same _result_ each time.

    +
  • +
  • + The completion record returned by this operation must not be affected by _moduleRequest_.[[Phase]].
  • The operation must treat _payload_ as an opaque value to be passed through to FinishLoadingImportedModule.
-

The actual process performed is host-defined, but typically consists of performing whatever I/O operations are necessary to load the appropriate Module Record. Multiple different (_referrer_, _specifier_) pairs may map to the same Module Record instance. The actual mapping semantics is host-defined but typically a normalization process is applied to _specifier_ as part of the mapping process. A typical normalization process would include actions such as expansion of relative and abbreviated path specifiers.

+

The actual process performed is host-defined, but typically consists of performing whatever I/O operations are necessary to load the appropriate Module Record. Multiple different (_referrer_, _moduleRequest_.[[Specifier]], _moduleRequest_.[[Attributes]]) triples may map to the same Module Record instance. The actual mapping semantics is host-defined but typically a normalization process is applied to _specifier_ as part of the mapping process. A typical normalization process would include actions such as expansion of relative and abbreviated path specifiers.

+ + +

Implementations may provide unobservable module loading optimizations, such as speculative preloading of modules that are likely to be requested next. When doing so, they should consider whether the module is being imported for its ~source~ phase, which won't cause calls to the HostLoadImportedModule hook for its transitive dependencies, or for its ~evaluation~ phase, which will.

+

FinishLoadingImportedModule ( _referrer_: a Script Record, a Cyclic Module Record, or a Realm Record, - _specifier_: a String, + _moduleRequest_: a ModuleRequest Record, _payload_: a GraphLoadingState Record or a PromiseCapability Record, _result_: either a normal completion containing a Module Record or a throw completion, ): ~unused~ @@ -28327,18 +28665,78 @@

1. If _result_ is a normal completion, then - 1. If _referrer_.[[LoadedModules]] contains a Record whose [[Specifier]] is _specifier_, then - 1. Assert: That Record's [[Module]] is _result_.[[Value]]. + 1. If _referrer_.[[LoadedModules]] contains a LoadedModuleRequest Record _record_ such that ModuleRequestsEqual(_record_, _moduleRequest_) is *true*, then + 1. Assert: _record_.[[Module]] and _result_.[[Value]] are the same Module Record. 1. Else, - 1. Append the Record { [[Specifier]]: _specifier_, [[Module]]: _result_.[[Value]] } to _referrer_.[[LoadedModules]]. + 1. Append the LoadedModuleRequest Record { [[Specifier]]: _moduleRequest_.[[Specifier]], [[Attributes]]: _moduleRequest_.[[Attributes]], [[Module]]: _result_.[[Value]] } to _referrer_.[[LoadedModules]]. 1. If _payload_ is a GraphLoadingState Record, then - 1. Perform ContinueModuleLoading(_payload_, _result_). + 1. Perform ContinueModuleLoading(_payload_, _moduleRequest_.[[Phase]], _result_). 1. Else, - 1. Perform ContinueDynamicImport(_payload_, _result_). + 1. Perform ContinueDynamicImport(_payload_, _moduleRequest_.[[Phase]], _result_). 1. Return ~unused~.
+ +

+ HostGetModuleSourceName ( + _moduleSource_: an Object, + ): either a normal completion containing a String or a throw completion +

+
+
description
+
+
+ +

An implementation of HostGetModuleSourceName must conform to the following requirements:

+
    +
  • + For any object that is a Module Source Object, returns a normal completion for a String corresponding to the source record type to be used as the strongly branded return value of the @@toStringTag getter on %AbstractModuleSource%. +
  • +
  • + For any object which is not a Module Source Object, returns a throw completion. +
  • +
+
+ + +

+ AllImportAttributesSupported ( + _attributes_: a List of ImportAttribute Records, + ): a Boolean +

+
+
description
+
+
+ + 1. Let _supported_ be HostGetSupportedImportAttributes(). + 1. For each ImportAttribute Record _attribute_ of _attributes_, do + 1. If _supported_ does not contain _attribute_.[[Key]], return *false*. + 1. Return *true*. + + + +

HostGetSupportedImportAttributes ( ): a List of Strings

+
+
description
+
It allows host environments to specify which import attributes they support. Only attributes with supported keys will be provided to the host.
+
+ +

An implementation of HostGetSupportedImportAttributes must conform to the following requrements:

+ +
    +
  • It must return a List of Strings, each indicating a supported attribute.
  • + +
  • Each time this operation is called, it must return the same List with the same contents in the same order.
  • +
+ +

The default implementation of HostGetSupportedImportAttributes is to return a new empty List.

+ + The purpose of requiring the host to specify its supported import attributes, rather than passing all attributes to the host and letting it then choose which ones it wants to handle, is to ensure that unsupported attributes are handled in a consistent way across different hosts. +
+
+

GetModuleNamespace ( @@ -28401,8 +28799,9 @@

Imports

Syntax

ImportDeclaration : - `import` ImportClause FromClause `;` - `import` ModuleSpecifier `;` + `import` ImportClause FromClause WithClause? `;` + `import` ModuleSpecifier WithClause? `;` + `import` `source` ImportedBinding FromClause WithClause? `;` ImportClause : ImportedDefaultBinding @@ -28438,6 +28837,18 @@

Syntax

ImportedBinding : BindingIdentifier[~Yield, +Await] + + WithClause : + `with` `{` `}` + `with` `{` WithEntries `,`? `}` + + WithEntries : + AttributeKey `:` StringLiteral + AttributeKey `:` StringLiteral `,` WithEntries + + AttributeKey : + IdentifierName + StringLiteral
@@ -28448,6 +28859,13 @@

Static Semantics: Early Errors

It is a Syntax Error if the BoundNames of |ImportDeclaration| contains any duplicate entries. + + WithClause : `with` `{` WithEntries `,`? `}` +
    +
  • + It is a Syntax Error if WithClauseToAttributes of |WithClause| has two different entries _a_ and _b_ such that _a_.[[Key]] is _b_.[[Key]]. +
  • +
@@ -28472,21 +28890,28 @@

Static Semantics: ImportEntries ( ): a List of ImportEntry Records

1. Return a new empty List. - ImportDeclaration : `import` ImportClause FromClause `;` + ImportDeclaration : `import` ImportClause FromClause WithClause? `;` - 1. Let _module_ be the sole element of the ModuleRequests of |FromClause|. + 1. Let _module_ be the sole element of the ModuleRequests of |ImportDeclaration|. 1. Return the ImportEntriesForModule of |ImportClause| with argument _module_. - ImportDeclaration : `import` ModuleSpecifier `;` + ImportDeclaration : `import` ModuleSpecifier WithClause? `;` 1. Return a new empty List. + ImportDeclaration : `import` `source` ImportedBinding FromClause WithClause? `;` + + 1. Let _module_ be the sole element of the ModuleRequests of |ImportDeclaration|. + 1. Let _localName_ be the sole element of BoundNames of |ImportedBinding|. + 1. Let _entry_ be the ImportEntry Record { [[ModuleRequest]]: _module_, [[ImportName]]: ~source~, [[LocalName]]: _localName_ }. + 1. Return « _entry_ ». +

Static Semantics: ImportEntriesForModule ( - _module_: a String, + _module_: a ModuleRequest Record, ): a List of ImportEntry Records

@@ -28539,6 +28964,43 @@

1. Return « _entry_ ». + + +

Static Semantics: WithClauseToAttributes ( ): a List of ImportAttribute Records

+
+
+ + + WithClause : `with` `{` `}` + + + 1. Return a new empty List. + + + + WithClause : `with` `{` WithEntries `,`? `}` + + + 1. Let _attributes_ be WithClauseToAttributes of |WithEntries|. + 1. Sort _attributes_ according to the lexicographic order of their [[Key]] fields, treating the value of each such field as a sequence of UTF-16 code unit values. NOTE: This sorting is observable only in that hosts are prohibited from changing behaviour based on the order in which attributes are enumerated. + 1. Return _attributes_. + + + WithEntries : AttributeKey `:` StringLiteral + + 1. Let _key_ be the PropName of |AttributeKey|. + 1. Let _entry_ be the ImportAttribute Record { [[Key]]: _key_, [[Value]]: the SV of |StringLiteral| }. + 1. Return « _entry_ ». + + + WithEntries : AttributeKey `:` StringLiteral `,` WithEntries + + 1. Let _key_ be the PropName of |AttributeKey|. + 1. Let _entry_ be the ImportAttribute Record { [[Key]]: _key_, [[Value]]: the SV of |StringLiteral| }. + 1. Let _rest_ be WithClauseToAttributes of |WithEntries|. + 1. Return the list-concatenation of « _entry_ » and _rest_. + +
@@ -28546,7 +29008,7 @@

Exports

Syntax

ExportDeclaration : - `export` ExportFromClause FromClause `;` + `export` ExportFromClause FromClause WithClause? `;` `export` NamedExports `;` `export` VariableStatement[~Yield, +Await] `export` Declaration[~Yield, +Await] @@ -28610,10 +29072,7 @@

Static Semantics: ExportedBindings ( ): a List of Strings

1. Return a new empty List. - - ExportDeclaration : - `export` ExportFromClause FromClause `;` - + ExportDeclaration : `export` ExportFromClause FromClause WithClause? `;` 1. Return a new empty List. @@ -28683,7 +29142,7 @@

Static Semantics: ExportedNames ( ): a List of Strings

1. Return a new empty List. - ExportDeclaration : `export` ExportFromClause FromClause `;` + ExportDeclaration : `export` ExportFromClause FromClause WithClause? `;` 1. Return the ExportedNames of |ExportFromClause|. @@ -28758,9 +29217,9 @@

Static Semantics: ExportEntries ( ): a List of ExportEntry Records

1. Return a new empty List. - ExportDeclaration : `export` ExportFromClause FromClause `;` + ExportDeclaration : `export` ExportFromClause FromClause WithClause? `;` - 1. Let _module_ be the sole element of the ModuleRequests of |FromClause|. + 1. Let _module_ be the sole element of the ModuleRequests of |ExportDeclaration|. 1. Return the ExportEntriesForModule of |ExportFromClause| with argument _module_. ExportDeclaration : `export` NamedExports `;` @@ -28808,7 +29267,7 @@

Static Semantics: ExportEntries ( ): a List of ExportEntry Records

Static Semantics: ExportEntriesForModule ( - _module_: a String or *null*, + _module_: a ModuleRequest Record or *null*, ): a List of ExportEntry Records

@@ -28891,7 +29350,7 @@

Static Semantics: ReferencedBindings ( ): a List of Parse Nodes

Runtime Semantics: Evaluation

ExportDeclaration : - `export` ExportFromClause FromClause `;` + `export` ExportFromClause FromClause WithClause? `;` `export` NamedExports `;` @@ -49195,6 +49654,82 @@

%Symbol.toStringTag%

This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

+ + +

Module Source Objects

+

Module Source Objects represent modules in their source import phase, which are not linked, instantiated or executed.

+

A Module Source Object is an object for which HostGetModuleSourceName returns a normal completion.

+

All Module Source Objects must be initialized with a prototype of %AbstractModuleSource%.prototype.

+

Hosts may define their own %AbstractModuleSource% subclasses for custom module types.

+ + +

The AbstractModuleSource Constructor

+

The AbstractModuleSource constructor:

+
    +
  • is %AbstractModuleSource%.
  • +
  • along with its corresponding prototype object, provides common properties that are inherited by Module Source constructors and their instances.
  • +
  • does not have a global name or appear as a property of the global object.
  • +
  • acts as a common superclass of the constructors of Module Source Objects.
  • +
  • will throw an error when invoked, because it is an abstract class constructor. The module source constructors do not perform a `super` call to it.
  • +
+ + +

AbstractModuleSource ( )

+

This function performs the following steps when called:

+ + 1. Throw a *TypeError* exception. + +
+
+ + +

Properties of the %AbstractModuleSource% Intrinsic Object

+

The %AbstractModuleSource% intrinsic object:

+
    +
  • has a [[Prototype]] internal slot whose value is %Function.prototype%.
  • +
  • has a *"name"* property whose value is *"AbstractModuleSource"*.
  • +
  • has the following properties:
  • +
+ + +

%AbstractModuleSource%.prototype

+

The initial value of %AbstractModuleSource%`.prototype` is the %AbstractModuleSource% prototype object.

+

This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.

+
+
+ + +

Properties of the %AbstractModuleSource% Prototype Object

+

The %AbstractModuleSource% prototype object:

+
    +
  • has a [[Prototype]] internal slot whose value is %Object.prototype%.
  • +
  • is %AbstractModuleSource.prototype%.
  • +
  • is an ordinary object.
  • +
  • has the following properties:
  • +
+ + +

%AbstractModuleSource%.prototype.constructor

+

The initial value of %AbstractModuleSource%`.prototype.constructor` is %AbstractModuleSource%.

+
+ + +

get %AbstractModuleSource%.prototype [ @@toStringTag ]

+

%AbstractModuleSource%.prototype `[@@toStringTag]` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:

+ + 1. Let _O_ be the *this* value. + 1. If _O_ is not an Object, return *undefined*. + 1. Let _sourceNameResult_ be Completion(HostGetModuleSourceName(_O_)). + 1. If _sourceNameResult_ is an abrupt completion, return *undefined*. + 1. Let _name_ be ! _sourceNameResult_. + 1. Assert: _name_ is a String. + 1. Return _name_. + +

This property has the attributes { [[Enumerable]]: *false*, [[Configurable]]: *true* }.

+

The initial value of the *"name"* property of this function is *"get [Symbol.toStringTag]"*.

+
+
+
@@ -50192,6 +50727,9 @@

Scripts and Modules

+ + + @@ -51445,9 +51983,11 @@

Host Hooks

HostEnsureCanCompileStrings(...)

HostFinalizeImportMeta(...)

HostGetImportMetaProperties(...)

+

HostGetModuleSourceName(...)

HostGrowSharedArrayBuffer(...)

HostHasSourceTextAvailable(...)

HostLoadImportedModule(...)

+

HostGetSupportedImportAttributes(...)

HostMakeJobCallback(...)

HostPromiseRejectionTracker(...)

HostResizeArrayBuffer(...)