The abstract operation EvaluateImportCall takes argument specifierExpression (a ParseNode) and optional argument optionsExpression (a ParseNode) and returns either a normal completion containing a Promise or a throw completion. It performs the following steps when called:
Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
Return promiseCapability.[[Promise]].
Sort attributes by the code point order of the [[Key]] of each element. NOTE: This sorting is observable only in that hosts are prohibited from distinguishing among attributes by the order they occur in.
Let moduleRequest be a new ModuleRequest Record { [[Specifier]]: specifierString, [[Attributes]]: attributes }.
Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
Return promiseCapability.[[Promise]].
Sort attributes by the code point order of the [[Key]] of each element. NOTE: This sorting is observable only in that hosts are prohibited from distinguishing among attributes by the order they occur in.
Let moduleRequest be a new ModuleRequest Record { [[Specifier]]: specifierString, [[Attributes]]: attributes }.
A Cyclic Module Record is used to represent information about a module that can participate in dependency cycles with other modules that are subclasses of the Cyclic Module Record type. Module Records that are not subclasses of the Cyclic Module Record type must not participate in dependency cycles with Source Text Module Records.
A Cyclic Module Record is used to represent information about a module that can participate in dependency cycles with other modules that are subclasses of the Cyclic Module Record type. Module Records that are not subclasses of the Cyclic Module Record type must not participate in dependency cycles with Source Text Module Records.
A List of all the ModuleSpecifier strings and import attributes used by the module represented by this record to request the importation of a module. The List is in source text occurrence order.
@@ -3014,7 +3011,7 @@
A map from the specifier strings used by the module represented by this record to request the importation of a module with the relative attributes to the resolved Module Record. The list does not contain two different Records with the same [[Specifier]]([[Specifier]], [[Attributes]]) pair.
@@ -3069,8 +3066,8 @@
16.2.1.5 Cyclic Module Records
16.2.1.6 Source Text Module Records
-
An ImportEntry Record is a Record that digests information about a single declarative import. Each ImportEntry Record has the fields defined in Table 4:
An ImportEntry Record is a Record that digests information about a single declarative import. Each ImportEntry Record has the fields defined in Table 4:
- If this operation is called multiple times with the same (referrer, specifier) pair(referrer, moduleRequest.[[Specifer]], moduleRequest.[[Attributes]]) triple and it performs FinishLoadingImportedModule(referrer, specifiermoduleRequest, payload, result) where result is a normal completion, then it must perform FinishLoadingImportedModule(referrer, specifiermoduleRequest, payload, result) with the same result each time.
+ If this operation is called multiple times with the same (referrer, specifier) pair(referrer, moduleRequest.[[Specifer]], moduleRequest.[[Attributes]]) triple and it performs FinishLoadingImportedModule(referrer, specifiermoduleRequest, payload, result) where result is a normal completion, then it must perform FinishLoadingImportedModule(referrer, specifiermoduleRequest, payload, result) with the same result each time.
If referrer.[[LoadedModules]] contains a Recordrecord such that record.[[Specifier]] is specifiermoduleRequest.[[Specifier]] and AttributesEqual(record.[[Attributes]], moduleRequest.[[Attributes]]) is true, then
Else, append the Record { [[Specifier]]: specifiermoduleRequest.[[Specifer]], [[Attributes]]: moduleRequest.[[Attributes]], [[Module]]: result.[[Value]] } to referrer.[[LoadedModules]].
If referrer.[[LoadedModules]] contains a Recordrecord such that record.[[Specifier]] is specifiermoduleRequest.[[Specifier]] and AttributesEqual(record.[[Attributes]], moduleRequest.[[Attributes]]) is true, then
Else, append the Record { [[Specifier]]: specifiermoduleRequest.[[Specifer]], [[Attributes]]: moduleRequest.[[Attributes]], [[Module]]: result.[[Value]] } to referrer.[[LoadedModules]].
The abstract operation AllImportAttributesSupported takes argument attributes (a List of ImportAttribute Records) and returns a Boolean. It performs the following steps when called:
If supported does not contain attribute.[[Key]], return false.
Return true.
+
The abstract operation AllImportAttributesSupported takes argument attributes (a List of ImportAttribute Records) and returns a Boolean. It performs the following steps when called:
Sort attributes by the code point order of the [[Key]] of each element. NOTE: This sorting is observable only in that hosts are prohibited from distinguishing among attributes by the order they occur in.
Sort attributes by the code point order of the [[Key]] of each element. NOTE: This sorting is observable only in that hosts are prohibited from distinguishing among attributes by the order they occur in.
Import Attributes are denoted using the withkeyword. However, there are existing implementations based on a previous version of the proposal using the assertkeyword. Due to potential web compatibility risks, the assertkeyword is still included in this specification, but its removal is being investigated.
Sort attributes by the code point order of the [[Key]] of each element. NOTE: This sorting is observable only in that hosts are prohibited from distinguishing among attributes by the order they occur in.
Sort attributes by the code point order of the [[Key]] of each element. NOTE: This sorting is observable only in that hosts are prohibited from distinguishing among attributes by the order they occur in.
The module script would have an additional item, which would be the module type, as a string (e.g., "json"), or undefined for a JavaScript module.
-
HostLoadImportedModule would take a ModuleRequest Record parameter in place of a specifier string, which would be passed down through several abstract operations to reach the fetch a single module script algorithm. Somewhere near the entrypoint, if the ModuleRequest Record's [[Attributes]] field has an element entry such that entry.[[Key]] is "type", then let type be entry.[[Value]]; otherwise let type be undefined. If the type is invalid, then an exception is thrown and module loading fails. Otherwise, this will equal the module type, if the module can be successfully fetched with a matching MIME type.
-
In the fetch the descendents of a module script algorithm, when iterating over [[RequestedModules]], the elements are ModuleRequest Records rather than just specifier strings; these Records is passed on to the internal module script graph fetching procedure (which sends it to "fetch a single module script". Other usage sites of [[RequestedModules]] ignore the attribute.
+
HostLoadImportedModule would take a ModuleRequest Record parameter in place of a specifier string, which would be passed down through several abstract operations to reach the fetch a single module script algorithm. Somewhere near the entrypoint, if the ModuleRequest Record's [[Attributes]] field has an element entry such that entry.[[Key]] is "type", then let type be entry.[[Value]]; otherwise let type be undefined. If the type is invalid, then an exception is thrown and module loading fails. Otherwise, this will equal the module type, if the module can be successfully fetched with a matching MIME type.
+
In the fetch the descendents of a module script algorithm, when iterating over [[RequestedModules]], the elements are ModuleRequest Records rather than just specifier strings; these Records is passed on to the internal module script graph fetching procedure (which sends it to "fetch a single module script". Other usage sites of [[RequestedModules]] ignore the attribute.
"Fetch a single module script" would check the attribute in two places:
The module map is keyed with both the absolute URL and the module type, so an existing entry will be found only if its type matches.
diff --git a/spec.emu b/spec.emu
index a022c1c..b4c5804 100644
--- a/spec.emu
+++ b/spec.emu
@@ -28,9 +28,6 @@
li[deprecated] {
display: list-item;
}
- ins[deprecated] > emu-rhs {
- padding-left: 60px;
- }
@@ -124,7 +121,7 @@
1. Return _promiseCapability_.[[Promise]].
1. Let _attributesObj_ be Completion(Get(_options_, *"with"*)).
1. IfAbruptRejectPromise(_attributesObj_, _promiseCapability_).
- 1. [deprecated=""] If _attributesObj_ is *undefined*, then
+ 1. [deprecated=""] If the host supports the deprecated `assert` keyword for import attributes and _attributesObj_ is *undefined*, then
1. Let _attributesObj_ be Completion(Get(_options_, *"assert"*)).
1. IfAbruptRejectPromise(_attributesObj_, _promiseCapability_).
1. If _attributesObj_ is not *undefined*, then