diff --git a/index.html b/index.html index 2c266db..ce76629 100644 --- a/index.html +++ b/index.html @@ -1350,7 +1350,7 @@ }); let sdoMap = JSON.parse(`{"prod-k77_OH1u":{"Evaluation":{"clause":"13.3.10.1","ids":["prod-DuEmEibb","prod-4N8EtSSM"]}},"prod-nQPLRauX":{"Evaluation":{"clause":"13.3.10.1","ids":["prod-OGjeE4Nc"]}},"prod-WzAgO-V_":{"ModuleRequests":{"clause":"16.2.1.3","ids":["prod-Fii3Jv-w"]}},"prod-L0spfeSo":{"ModuleRequests":{"clause":"16.2.1.3","ids":["prod-QB5EyLim"]}},"prod-xLj2bJln":{"WithClauseToAttributes":{"clause":"16.2.2.2","ids":["prod-1UPpcS0w"]}},"prod-d4roO8vu":{"WithClauseToAttributes":{"clause":"16.2.2.2","ids":["prod-8QmTjvbt"]}},"prod-0HE4RviZ":{"WithClauseToAttributes":{"clause":"16.2.2.2","ids":["prod-_N0cbM5m"]}},"prod-oClSJ6kb":{"WithClauseToAttributes":{"clause":"16.2.2.2","ids":["prod-yNAe-CX-"]}}}`); -let biblio = JSON.parse(`{"refsByClause":{"intro":["_ref_0"],"sec-cyclic-module-records":["_ref_1","_ref_38","_ref_39","_ref_40","_ref_41","_ref_42","_ref_43"],"sec-source-text-module-records":["_ref_2","_ref_44","_ref_45","_ref_46","_ref_47","_ref_85","_ref_86"],"sec-HostLoadImportedModule":["_ref_3","_ref_48","_ref_49","_ref_50","_ref_51","_ref_52","_ref_53"],"sec-imports":["_ref_4","_ref_87","_ref_88","_ref_89","_ref_90","_ref_91","_ref_92"],"sec-imports-static-semantics-early-errors":["_ref_5","_ref_64","_ref_65","_ref_66","_ref_93","_ref_94","_ref_95"],"sec-assert-clause-to-attributes":["_ref_6","_ref_67","_ref_68","_ref_69","_ref_70","_ref_71","_ref_96","_ref_97","_ref_98","_ref_99","_ref_100","_ref_101","_ref_102","_ref_103"],"sec-deprecated-assert-keyword-for-import-attributes":["_ref_7","_ref_8","_ref_9","_ref_72","_ref_73","_ref_74","_ref_75","_ref_76","_ref_104","_ref_105","_ref_106","_ref_107","_ref_108","_ref_109","_ref_110","_ref_111","_ref_112"],"sec-import-call-runtime-semantics-evaluation":["_ref_10","_ref_11","_ref_12"],"sec-evaluate-import-call":["_ref_13","_ref_14","_ref_15","_ref_16"],"sec-modulerequest-record":["_ref_17","_ref_18","_ref_19","_ref_20","_ref_21","_ref_22","_ref_23","_ref_24","_ref_25"],"sec-static-semantics-modulerequests":["_ref_26","_ref_27","_ref_28","_ref_29","_ref_30","_ref_31","_ref_32","_ref_33","_ref_34","_ref_35","_ref_36","_ref_37","_ref_81","_ref_82","_ref_83","_ref_84"],"sec-FinishLoadingImportedModule":["_ref_54","_ref_55","_ref_56","_ref_57"],"sec-FinishLoadingImportedModule-AttributesEqual":["_ref_58","_ref_59","_ref_60","_ref_61"],"sec-AllImportAttributesSupported":["_ref_62","_ref_63"],"sec-host-integration":["_ref_77","_ref_78","_ref_79","_ref_80"],"sec-exports":["_ref_113"]},"entries":[{"type":"clause","id":"intro","titleHTML":"Import Attributes","number":""},{"type":"term","term":"Deprecated","refId":"sec-conformance"},{"type":"clause","id":"sec-conformance-deprecated","titleHTML":"Example Deprecated Clause Heading","number":"2.1"},{"type":"clause","id":"sec-conformance","titleHTML":"Conformance","number":"2","referencingIds":["_ref_0"]},{"type":"production","id":"prod-ImportCall","name":"ImportCall"},{"type":"clause","id":"sec-import-call-runtime-semantics-evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.3.10.1"},{"type":"op","aoid":"EvaluateImportCall","refId":"sec-evaluate-import-call"},{"type":"clause","id":"sec-evaluate-import-call","title":"EvaluateImportCall ( specifierExpression [ , optionsExpression ] )","titleHTML":"EvaluateImportCall ( specifierExpression [ , optionsExpression ] )","number":"13.3.10.2","referencingIds":["_ref_10","_ref_11"]},{"type":"clause","id":"sec-import-calls","titleHTML":"Import Calls","number":"13.3.10","referencingIds":["_ref_3"]},{"type":"clause","id":"sec-left-hand-side-expressions","titleHTML":"Left-Hand-Side Expressions","number":"13.3"},{"type":"clause","id":"sec-ecmascript-language-expressions","titleHTML":"ECMAScript Language: Expressions","number":"13"},{"type":"term","term":"ModuleRequest Record","id":"modulerequest-record","referencingIds":["_ref_15","_ref_17","_ref_20","_ref_22","_ref_23","_ref_25","_ref_26","_ref_31","_ref_33","_ref_35","_ref_37","_ref_42","_ref_46","_ref_47","_ref_49","_ref_55","_ref_78","_ref_79","_ref_80"]},{"type":"table","id":"table-modulerequest-fields","number":1,"caption":"Table 1: ModuleRequest Record fields"},{"type":"term","term":"ImportAttribute Record","id":"importattribute-record","referencingIds":["_ref_13","_ref_18","_ref_19","_ref_43","_ref_58","_ref_59","_ref_60","_ref_61","_ref_62","_ref_67","_ref_69","_ref_70"]},{"type":"table","id":"table-importattribute-fields","number":2,"caption":"Table 2: ImportAttribute Record fields"},{"type":"clause","id":"sec-modulerequest-record","title":"ModuleRequest and ImportAttribute Records","titleHTML":"ModuleRequest and ImportAttribute Records","number":"16.2.1.1"},{"type":"op","aoid":"ModuleRequests","refId":"sec-static-semantics-modulerequests"},{"type":"clause","id":"sec-static-semantics-modulerequests","titleHTML":"Static Semantics: ModuleRequests","number":"16.2.1.3","referencingIds":["_ref_21","_ref_27","_ref_28","_ref_29","_ref_30","_ref_34"]},{"type":"term","term":"Cyclic Module Record","id":"cyclic-module-record","referencingIds":["_ref_24","_ref_38","_ref_39","_ref_40","_ref_41","_ref_48","_ref_54","_ref_57"]},{"type":"table","id":"table-cyclic-module-fields","number":3,"caption":"Table 3: Additional Fields of Cyclic Module Records","referencingIds":["_ref_1"]},{"type":"clause","id":"sec-cyclic-module-records","titleHTML":"Cyclic Module Records","number":"16.2.1.5"},{"type":"term","term":"ImportEntry Record","id":"importentry-record","referencingIds":["_ref_44","_ref_45"]},{"type":"table","id":"table-importentry-record-fields","number":4,"caption":"Table 4: ImportEntry Record Fields","referencingIds":["_ref_2"]},{"type":"clause","id":"sec-source-text-module-records","titleHTML":"Source Text Module Records","number":"16.2.1.6"},{"type":"note","id":"note-HostLoadImportedModule-referrer-Realm-Record","number":1},{"type":"op","aoid":"HostLoadImportedModule","refId":"sec-HostLoadImportedModule"},{"type":"clause","id":"sec-HostLoadImportedModule","title":"HostLoadImportedModule ( referrer, specifier, moduleRequest, hostDefined, payload )","titleHTML":"HostLoadImportedModule ( referrer, specifier, moduleRequest, hostDefined, payload )","number":"16.2.1.8","referencingIds":["_ref_12","_ref_16","_ref_77"]},{"type":"op","aoid":"AttributesEqual","refId":"sec-FinishLoadingImportedModule-AttributesEqual"},{"type":"clause","id":"sec-FinishLoadingImportedModule-AttributesEqual","title":"AttributesEqual ( left, right )","titleHTML":"AttributesEqual ( left, right )","number":"16.2.1.9.1","referencingIds":["_ref_56"]},{"type":"op","aoid":"FinishLoadingImportedModule","refId":"sec-FinishLoadingImportedModule"},{"type":"clause","id":"sec-FinishLoadingImportedModule","title":"FinishLoadingImportedModule ( referrer, specifier, moduleRequest, payload, result )","titleHTML":"FinishLoadingImportedModule ( referrer, specifier, moduleRequest, payload, result )","number":"16.2.1.9","referencingIds":["_ref_50","_ref_51","_ref_52","_ref_53"]},{"type":"op","aoid":"HostGetSupportedImportAttributes","refId":"sec-hostgetsupportedimportattributes"},{"type":"clause","id":"sec-hostgetsupportedimportattributes","title":"HostGetSupportedImportAttributes ( )","titleHTML":"HostGetSupportedImportAttributes ( )","number":"16.2.1.10.1","referencingIds":["_ref_63"]},{"type":"op","aoid":"AllImportAttributesSupported","refId":"sec-AllImportAttributesSupported"},{"type":"clause","id":"sec-AllImportAttributesSupported","title":"AllImportAttributesSupported ( attributes )","titleHTML":"AllImportAttributesSupported ( attributes )","number":"16.2.1.10","referencingIds":["_ref_14","_ref_65","_ref_73"]},{"type":"clause","id":"sec-module-semantics","titleHTML":"Module Semantics","number":"16.2.1"},{"type":"production","id":"prod-ImportDeclaration","name":"ImportDeclaration"},{"type":"production","id":"prod-WithClause","name":"WithClause","referencingIds":["_ref_81","_ref_82","_ref_83","_ref_84","_ref_87","_ref_88","_ref_94","_ref_95","_ref_113"]},{"type":"production","id":"prod-WithEntries","name":"WithEntries","referencingIds":["_ref_89","_ref_92","_ref_93","_ref_96","_ref_97","_ref_101","_ref_103","_ref_107","_ref_108","_ref_111","_ref_112"]},{"type":"production","id":"prod-AttributeKey","name":"AttributeKey","referencingIds":["_ref_90","_ref_91","_ref_98","_ref_99","_ref_100","_ref_102"]},{"type":"clause","id":"sec-imports-static-semantics-early-errors","titleHTML":"Static Semantics: Early Errors","number":"16.2.2.1","referencingIds":["_ref_8"]},{"type":"op","aoid":"WithClauseToAttributes","refId":"sec-assert-clause-to-attributes"},{"type":"clause","id":"sec-assert-clause-to-attributes","title":"Static Semantics: WithClauseToAttributes","titleHTML":"Static Semantics: WithClauseToAttributes","number":"16.2.2.2","referencingIds":["_ref_9","_ref_32","_ref_36","_ref_64","_ref_66","_ref_68","_ref_71","_ref_72","_ref_74","_ref_75","_ref_76"]},{"type":"production","id":"prod-ImportDeclaration","name":"ImportDeclaration","referencingIds":["_ref_85","_ref_86","_ref_104"]},{"type":"production","id":"prod-AssertClause","name":"AssertClause","referencingIds":["_ref_105","_ref_106","_ref_109","_ref_110"]},{"type":"clause","id":"sec-deprecated-assert-keyword-for-import-attributes","title":"Deprecated assert keyword for Import Attributes","titleHTML":"Deprecated assert keyword for Import Attributes","number":"16.2.2.3","referencingIds":["_ref_4","_ref_5","_ref_6"]},{"type":"clause","id":"sec-imports","titleHTML":"Imports","number":"16.2.2","referencingIds":["_ref_7"]},{"type":"clause","id":"sec-exports","titleHTML":"Exports","number":"16.2.3"},{"type":"clause","id":"sec-modules","titleHTML":"Modules","number":"16.2"},{"type":"clause","id":"sec-ecmascript-language-scripts-and-modules","titleHTML":"ECMAScript Language: Scripts and Modules","number":"16"},{"type":"clause","id":"sec-host-integration","titleHTML":"Sample host integration: The Web embedding","number":"A"}]}`); +let biblio = JSON.parse(`{"refsByClause":{"intro":["_ref_0"],"sec-evaluate-import-call":["_ref_1","_ref_14","_ref_15","_ref_16","_ref_17"],"sec-cyclic-module-records":["_ref_2","_ref_39","_ref_40","_ref_41","_ref_42","_ref_43","_ref_44"],"sec-source-text-module-records":["_ref_3","_ref_45","_ref_46","_ref_47","_ref_48","_ref_86","_ref_87"],"sec-HostLoadImportedModule":["_ref_4","_ref_49","_ref_50","_ref_51","_ref_52","_ref_53","_ref_54"],"sec-imports":["_ref_5","_ref_88","_ref_89","_ref_90","_ref_91","_ref_92","_ref_93"],"sec-imports-static-semantics-early-errors":["_ref_6","_ref_65","_ref_66","_ref_67","_ref_94","_ref_95","_ref_96"],"sec-assert-clause-to-attributes":["_ref_7","_ref_68","_ref_69","_ref_70","_ref_71","_ref_72","_ref_97","_ref_98","_ref_99","_ref_100","_ref_101","_ref_102","_ref_103","_ref_104"],"sec-deprecated-assert-keyword-for-import-attributes":["_ref_8","_ref_9","_ref_10","_ref_73","_ref_74","_ref_75","_ref_76","_ref_77","_ref_105","_ref_106","_ref_107","_ref_108","_ref_109","_ref_110","_ref_111","_ref_112","_ref_113"],"sec-import-call-runtime-semantics-evaluation":["_ref_11","_ref_12","_ref_13"],"sec-modulerequest-record":["_ref_18","_ref_19","_ref_20","_ref_21","_ref_22","_ref_23","_ref_24","_ref_25","_ref_26"],"sec-static-semantics-modulerequests":["_ref_27","_ref_28","_ref_29","_ref_30","_ref_31","_ref_32","_ref_33","_ref_34","_ref_35","_ref_36","_ref_37","_ref_38","_ref_82","_ref_83","_ref_84","_ref_85"],"sec-FinishLoadingImportedModule":["_ref_55","_ref_56","_ref_57","_ref_58"],"sec-FinishLoadingImportedModule-AttributesEqual":["_ref_59","_ref_60","_ref_61","_ref_62"],"sec-AllImportAttributesSupported":["_ref_63","_ref_64"],"sec-host-integration":["_ref_78","_ref_79","_ref_80","_ref_81"],"sec-exports":["_ref_114"]},"entries":[{"type":"clause","id":"intro","titleHTML":"Import Attributes","number":""},{"type":"term","term":"Deprecated","refId":"sec-conformance"},{"type":"clause","id":"sec-conformance-deprecated","titleHTML":"Example Deprecated Clause Heading","number":"2.1"},{"type":"clause","id":"sec-conformance","titleHTML":"Conformance","number":"2","referencingIds":["_ref_0"]},{"type":"production","id":"prod-ImportCall","name":"ImportCall"},{"type":"clause","id":"sec-import-call-runtime-semantics-evaluation","titleHTML":"Runtime Semantics: Evaluation","number":"13.3.10.1"},{"type":"op","aoid":"EvaluateImportCall","refId":"sec-evaluate-import-call"},{"type":"clause","id":"sec-evaluate-import-call","title":"EvaluateImportCall ( specifierExpression [ , optionsExpression ] )","titleHTML":"EvaluateImportCall ( specifierExpression [ , optionsExpression ] )","number":"13.3.10.2","referencingIds":["_ref_11","_ref_12"]},{"type":"clause","id":"sec-import-calls","titleHTML":"Import Calls","number":"13.3.10","referencingIds":["_ref_4"]},{"type":"clause","id":"sec-left-hand-side-expressions","titleHTML":"Left-Hand-Side Expressions","number":"13.3"},{"type":"clause","id":"sec-ecmascript-language-expressions","titleHTML":"ECMAScript Language: Expressions","number":"13"},{"type":"term","term":"ModuleRequest Record","id":"modulerequest-record","referencingIds":["_ref_16","_ref_18","_ref_21","_ref_23","_ref_24","_ref_26","_ref_27","_ref_32","_ref_34","_ref_36","_ref_38","_ref_43","_ref_47","_ref_48","_ref_50","_ref_56","_ref_79","_ref_80","_ref_81"]},{"type":"table","id":"table-modulerequest-fields","number":1,"caption":"Table 1: ModuleRequest Record fields"},{"type":"term","term":"ImportAttribute Record","id":"importattribute-record","referencingIds":["_ref_14","_ref_19","_ref_20","_ref_44","_ref_59","_ref_60","_ref_61","_ref_62","_ref_63","_ref_68","_ref_70","_ref_71"]},{"type":"table","id":"table-importattribute-fields","number":2,"caption":"Table 2: ImportAttribute Record fields"},{"type":"clause","id":"sec-modulerequest-record","title":"ModuleRequest and ImportAttribute Records","titleHTML":"ModuleRequest and ImportAttribute Records","number":"16.2.1.1"},{"type":"op","aoid":"ModuleRequests","refId":"sec-static-semantics-modulerequests"},{"type":"clause","id":"sec-static-semantics-modulerequests","titleHTML":"Static Semantics: ModuleRequests","number":"16.2.1.3","referencingIds":["_ref_22","_ref_28","_ref_29","_ref_30","_ref_31","_ref_35"]},{"type":"term","term":"Cyclic Module Record","id":"cyclic-module-record","referencingIds":["_ref_25","_ref_39","_ref_40","_ref_41","_ref_42","_ref_49","_ref_55","_ref_58"]},{"type":"table","id":"table-cyclic-module-fields","number":3,"caption":"Table 3: Additional Fields of Cyclic Module Records","referencingIds":["_ref_2"]},{"type":"clause","id":"sec-cyclic-module-records","titleHTML":"Cyclic Module Records","number":"16.2.1.5"},{"type":"term","term":"ImportEntry Record","id":"importentry-record","referencingIds":["_ref_45","_ref_46"]},{"type":"table","id":"table-importentry-record-fields","number":4,"caption":"Table 4: ImportEntry Record Fields","referencingIds":["_ref_3"]},{"type":"clause","id":"sec-source-text-module-records","titleHTML":"Source Text Module Records","number":"16.2.1.6"},{"type":"note","id":"note-HostLoadImportedModule-referrer-Realm-Record","number":1},{"type":"op","aoid":"HostLoadImportedModule","refId":"sec-HostLoadImportedModule"},{"type":"clause","id":"sec-HostLoadImportedModule","title":"HostLoadImportedModule ( referrer, specifier, moduleRequest, hostDefined, payload )","titleHTML":"HostLoadImportedModule ( referrer, specifier, moduleRequest, hostDefined, payload )","number":"16.2.1.8","referencingIds":["_ref_13","_ref_17","_ref_78"]},{"type":"op","aoid":"AttributesEqual","refId":"sec-FinishLoadingImportedModule-AttributesEqual"},{"type":"clause","id":"sec-FinishLoadingImportedModule-AttributesEqual","title":"AttributesEqual ( left, right )","titleHTML":"AttributesEqual ( left, right )","number":"16.2.1.9.1","referencingIds":["_ref_57"]},{"type":"op","aoid":"FinishLoadingImportedModule","refId":"sec-FinishLoadingImportedModule"},{"type":"clause","id":"sec-FinishLoadingImportedModule","title":"FinishLoadingImportedModule ( referrer, specifier, moduleRequest, payload, result )","titleHTML":"FinishLoadingImportedModule ( referrer, specifier, moduleRequest, payload, result )","number":"16.2.1.9","referencingIds":["_ref_51","_ref_52","_ref_53","_ref_54"]},{"type":"op","aoid":"HostGetSupportedImportAttributes","refId":"sec-hostgetsupportedimportattributes"},{"type":"clause","id":"sec-hostgetsupportedimportattributes","title":"HostGetSupportedImportAttributes ( )","titleHTML":"HostGetSupportedImportAttributes ( )","number":"16.2.1.10.1","referencingIds":["_ref_64"]},{"type":"op","aoid":"AllImportAttributesSupported","refId":"sec-AllImportAttributesSupported"},{"type":"clause","id":"sec-AllImportAttributesSupported","title":"AllImportAttributesSupported ( attributes )","titleHTML":"AllImportAttributesSupported ( attributes )","number":"16.2.1.10","referencingIds":["_ref_15","_ref_66","_ref_74"]},{"type":"clause","id":"sec-module-semantics","titleHTML":"Module Semantics","number":"16.2.1"},{"type":"production","id":"prod-ImportDeclaration","name":"ImportDeclaration"},{"type":"production","id":"prod-WithClause","name":"WithClause","referencingIds":["_ref_82","_ref_83","_ref_84","_ref_85","_ref_88","_ref_89","_ref_95","_ref_96","_ref_114"]},{"type":"production","id":"prod-WithEntries","name":"WithEntries","referencingIds":["_ref_90","_ref_93","_ref_94","_ref_97","_ref_98","_ref_102","_ref_104","_ref_108","_ref_109","_ref_112","_ref_113"]},{"type":"production","id":"prod-AttributeKey","name":"AttributeKey","referencingIds":["_ref_91","_ref_92","_ref_99","_ref_100","_ref_101","_ref_103"]},{"type":"clause","id":"sec-imports-static-semantics-early-errors","titleHTML":"Static Semantics: Early Errors","number":"16.2.2.1","referencingIds":["_ref_9"]},{"type":"op","aoid":"WithClauseToAttributes","refId":"sec-assert-clause-to-attributes"},{"type":"clause","id":"sec-assert-clause-to-attributes","title":"Static Semantics: WithClauseToAttributes","titleHTML":"Static Semantics: WithClauseToAttributes","number":"16.2.2.2","referencingIds":["_ref_10","_ref_33","_ref_37","_ref_65","_ref_67","_ref_69","_ref_72","_ref_73","_ref_75","_ref_76","_ref_77"]},{"type":"production","id":"prod-ImportDeclaration","name":"ImportDeclaration","referencingIds":["_ref_86","_ref_87","_ref_105"]},{"type":"production","id":"prod-AssertClause","name":"AssertClause","referencingIds":["_ref_106","_ref_107","_ref_110","_ref_111"]},{"type":"clause","id":"sec-deprecated-assert-keyword-for-import-attributes","title":"Deprecated assert keyword for Import Attributes","titleHTML":"Deprecated assert keyword for Import Attributes","number":"16.2.2.3","referencingIds":["_ref_1","_ref_5","_ref_6","_ref_7"]},{"type":"clause","id":"sec-imports","titleHTML":"Imports","number":"16.2.2","referencingIds":["_ref_8"]},{"type":"clause","id":"sec-exports","titleHTML":"Exports","number":"16.2.3"},{"type":"clause","id":"sec-modules","titleHTML":"Modules","number":"16.2"},{"type":"clause","id":"sec-ecmascript-language-scripts-and-modules","titleHTML":"ECMAScript Language: Scripts and Modules","number":"16"},{"type":"clause","id":"sec-host-integration","titleHTML":"Sample host integration: The Web embedding","number":"A"}]}`); ;let usesMultipage = false @@ -2707,7 +2704,7 @@

13.3.10.1 Runtime Semantics: Evaluation

-
  1. Return ? EvaluateImportCall(AssignmentExpression).
+
  1. Return ? EvaluateImportCall(AssignmentExpression).
ImportCall : @@ -2721,7 +2718,7 @@

13.3.10.1 Runtime Semantics: Evaluation

-
  1. Return ? EvaluateImportCall(the first AssignmentExpression, the second AssignmentExpression).
+
  1. Return ? EvaluateImportCall(the first AssignmentExpression, the second AssignmentExpression).
ImportCall : @@ -2732,13 +2729,13 @@

13.3.10.1 Runtime Semantics: Evaluation

-
  1. Let referrer be GetActiveScriptOrModule().
  2. If referrer is null, set referrer to the current Realm Record.
  3. Let argRef be ? Evaluation of AssignmentExpression.
  4. Let specifier be ? GetValue(argRef).
  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
  6. Let specifierString be Completion(ToString(specifier)).
  7. IfAbruptRejectPromise(specifierString, promiseCapability).
  8. Perform HostLoadImportedModule(referrer, specifierString, empty, promiseCapability).
  9. Return promiseCapability.[[Promise]].
+
  1. Let referrer be GetActiveScriptOrModule().
  2. If referrer is null, set referrer to the current Realm Record.
  3. Let argRef be ? Evaluation of AssignmentExpression.
  4. Let specifier be ? GetValue(argRef).
  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
  6. Let specifierString be Completion(ToString(specifier)).
  7. IfAbruptRejectPromise(specifierString, promiseCapability).
  8. Perform HostLoadImportedModule(referrer, specifierString, empty, promiseCapability).
  9. Return promiseCapability.[[Promise]].

13.3.10.2 EvaluateImportCall ( specifierExpression [ , optionsExpression ] )

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:

-
  1. Let referrer be GetActiveScriptOrModule().
  2. If referrer is null, set referrer to the current Realm Record.
  3. Let specifierRef be the result of evaluating specifierExpression.
  4. Let specifier be ? GetValue(specifierRef).
  5. If optionsExpression is present, then
    1. Let optionsRef be the result of evaluating optionsExpression.
    2. Let options be ? GetValue(optionsRef).
  6. Else,
    1. Let options be undefined.
  7. Let promiseCapability be ! NewPromiseCapability(%Promise%).
  8. Let specifierString be Completion(ToString(specifier)).
  9. IfAbruptRejectPromise(specifierString, promiseCapability).
  10. Let attributes be a new empty List.
  11. If options is not undefined, then
    1. If Type(options) is not Object, then
      1. Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
      2. Return promiseCapability.[[Promise]].
    2. Let attributesObj be Completion(Get(options, "with")).
    3. IfAbruptRejectPromise(attributesObj, promiseCapability).
    4. If attributesObj is undefined, then
      1. Let attributesObj be Completion(Get(options, "assert")).
      2. IfAbruptRejectPromise(attributesObj, promiseCapability).
    5. If attributesObj is not undefined, then
      1. If Type(attributesObj) is not Object, then
        1. Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
        2. Return promiseCapability.[[Promise]].
      2. Let keys be Completion(EnumerableOwnProperties(attributesObj, key)).
      3. IfAbruptRejectPromise(keys, promiseCapability).
      4. For each String key of keys, do
        1. Let value be Completion(Get(attributesObj, key)).
        2. IfAbruptRejectPromise(value, promiseCapability).
        3. If Type(value) is not String, then
          1. Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
          2. Return promiseCapability.[[Promise]].
        4. Append the ImportAttribute Record { [[Key]]: key, [[Value]]: value } to attributes.
    6. If AllImportAttributesSupported(attributes) is false, then
      1. Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
      2. Return promiseCapability.[[Promise]].
    7. 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.
  12. Let moduleRequest be a new ModuleRequest Record { [[Specifier]]: specifierString, [[Attributes]]: attributes }.
  13. Perform HostLoadImportedModule(referrer, moduleRequest, empty, promiseCapability).
  14. Return promiseCapability.[[Promise]].
+
  1. Let referrer be GetActiveScriptOrModule().
  2. If referrer is null, set referrer to the current Realm Record.
  3. Let specifierRef be the result of evaluating specifierExpression.
  4. Let specifier be ? GetValue(specifierRef).
  5. If optionsExpression is present, then
    1. Let optionsRef be the result of evaluating optionsExpression.
    2. Let options be ? GetValue(optionsRef).
  6. Else,
    1. Let options be undefined.
  7. Let promiseCapability be ! NewPromiseCapability(%Promise%).
  8. Let specifierString be Completion(ToString(specifier)).
  9. IfAbruptRejectPromise(specifierString, promiseCapability).
  10. Let attributes be a new empty List.
  11. If options is not undefined, then
    1. If Type(options) is not Object, then
      1. Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
      2. Return promiseCapability.[[Promise]].
    2. Let attributesObj be Completion(Get(options, "with")).
    3. IfAbruptRejectPromise(attributesObj, promiseCapability).
    4. If the host supports the deprecated assert keyword for import attributes and attributesObj is undefined, then
      1. Let attributesObj be Completion(Get(options, "assert")).
      2. IfAbruptRejectPromise(attributesObj, promiseCapability).
    5. If attributesObj is not undefined, then
      1. If Type(attributesObj) is not Object, then
        1. Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
        2. Return promiseCapability.[[Promise]].
      2. Let keys be Completion(EnumerableOwnProperties(attributesObj, key)).
      3. IfAbruptRejectPromise(keys, promiseCapability).
      4. For each String key of keys, do
        1. Let value be Completion(Get(attributesObj, key)).
        2. IfAbruptRejectPromise(value, promiseCapability).
        3. If Type(value) is not String, then
          1. Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
          2. Return promiseCapability.[[Promise]].
        4. Append the ImportAttribute Record { [[Key]]: key, [[Value]]: value } to attributes.
    6. If AllImportAttributesSupported(attributes) is false, then
      1. Perform ! Call(promiseCapability.[[Reject]], undefined, « a newly created TypeError object »).
      2. Return promiseCapability.[[Promise]].
    7. 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.
  12. Let moduleRequest be a new ModuleRequest Record { [[Specifier]]: specifierString, [[Attributes]]: attributes }.
  13. Perform HostLoadImportedModule(referrer, moduleRequest, empty, promiseCapability).
  14. Return promiseCapability.[[Promise]].
Note
Removal of the assert fallback when options's with property is undefined is being investigated. @@ -2761,7 +2758,7 @@

16.2.1 Module Semantics

16.2.1.1 ModuleRequest and ImportAttribute Records

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

-
Table 1: ModuleRequest Record fields
+
Table 1: ModuleRequest Record fields
@@ -2791,7 +2788,7 @@

16.2.1.1 ModuleRequest and ImportAttribute [[Attributes]]

- a List of ImportAttribute Records + a List of ImportAttribute Records The import attributes @@ -2802,7 +2799,7 @@

16.2.1.1 ModuleRequest and ImportAttribute

An ImportAttribute Record consists of the following fields:

-
Table 2: ImportAttribute Record fields
+
Table 2: ImportAttribute Record fields
@@ -2842,12 +2839,12 @@

16.2.1.1 ModuleRequest and ImportAttribute

- Editor's Note
In general, this proposal replaces places where module specifiers are passed around with ModuleRequest Records. For example, several syntax-directed operations, such as ModuleRequests produce Lists of ModuleRequest Records rather than Lists of Strings which are interpreted as module specifiers. Some algorithms like ImportEntries and ImportEntriesForModule pass around ModuleRequest Records rather than Strings, in a way which doesn't require any particular textual change. Additionally, record fields in Cyclic Module Records and Source Text Module Records which contained Lists of Strings are replaced by Lists of ModuleRequest Records, as indicated above.
+ Editor's Note
In general, this proposal replaces places where module specifiers are passed around with ModuleRequest Records. For example, several syntax-directed operations, such as ModuleRequests produce Lists of ModuleRequest Records rather than Lists of Strings which are interpreted as module specifiers. Some algorithms like ImportEntries and ImportEntriesForModule pass around ModuleRequest Records rather than Strings, in a way which doesn't require any particular textual change. Additionally, record fields in Cyclic Module Records and Source Text Module Records which contained Lists of Strings are replaced by Lists of ModuleRequest Records, as indicated above.

16.2.1.3 Static Semantics: ModuleRequests

-

The syntax-directed operation ModuleRequests takes no arguments and returns a List of StringsModuleRequest Records. It is defined piecewise over the following productions:

+

The syntax-directed operation ModuleRequests takes no arguments and returns a List of StringsModuleRequest Records. It is defined piecewise over the following productions:

Module : [empty] @@ -2857,7 +2854,7 @@

16.2.1.3 Static Semantics: ModuleRequests

ModuleItemList : ModuleItem
-
  1. Return ModuleRequests of ModuleItem.
+
  1. Return ModuleRequests of ModuleItem.
ModuleItemList : ModuleItemList @@ -2865,7 +2862,7 @@

16.2.1.3 Static Semantics: ModuleRequests

-
  1. Let moduleNames be ModuleRequests of ModuleItemList.
  2. Let additionalNames be ModuleRequests of ModuleItem.
  3. For each String name of additionalNames, do
    1. If moduleNames does not contain name, then
      1. Append name to moduleNames.
  4. Return moduleNames.
+
  1. Let moduleNames be ModuleRequests of ModuleItemList.
  2. Let additionalNames be ModuleRequests of ModuleItem.
  3. For each String name of additionalNames, do
    1. If moduleNames does not contain name, then
      1. Append name to moduleNames.
  4. Return moduleNames.
ModuleItem : StatementListItem @@ -2880,18 +2877,18 @@

16.2.1.3 Static Semantics: ModuleRequests

-
  1. Return ModuleRequests of FromClause.
  2. Let specifier be SV of the ModuleSpecifier contained in FromClause.
  3. Return a ModuleRequest Record { [[Specifer]]: specifier, [[Attributes]]: « » }.
+
  1. Return ModuleRequests of FromClause.
  2. Let specifier be SV of the ModuleSpecifier contained in FromClause.
  3. Return a ModuleRequest Record { [[Specifer]]: specifier, [[Attributes]]: « » }.
ImportDeclaration : import ImportClause FromClause - WithClause + WithClause ; -
  1. Let specifier be SV of the ModuleSpecifier contained in FromClause.
  2. Let attributes be WithClauseToAttributes of WithClause.
  3. Return a ModuleRequest Record { [[Specifer]]: specifier, [[Attributes]]: attributes }.
+
  1. Let specifier be SV of the ModuleSpecifier contained in FromClause.
  2. Let attributes be WithClauseToAttributes of WithClause.
  3. Return a ModuleRequest Record { [[Specifer]]: specifier, [[Attributes]]: attributes }.
ModuleSpecifier : StringLiteral @@ -2906,18 +2903,18 @@

16.2.1.3 Static Semantics: ModuleRequests

-
  1. Return ModuleRequests of FromClause.
  2. Let specifier be SV of the ModuleSpecifier contained in FromClause.
  3. Return a ModuleRequest Record { [[Specifer]]: specifier, [[Attributes]]: « » }.
+
  1. Return ModuleRequests of FromClause.
  2. Let specifier be SV of the ModuleSpecifier contained in FromClause.
  3. Return a ModuleRequest Record { [[Specifer]]: specifier, [[Attributes]]: « » }.
ExportDeclaration : export ExportFromClause FromClause - WithClause + WithClause ; -
  1. Let specifier be SV of the ModuleSpecifier contained in FromClause.
  2. Let attributes be WithClauseToAttributes of WithClause.
  3. Return a ModuleRequest Record { [[Specifer]]: specifier, [[Attributes]]: attributes }.
+
  1. Let specifier be SV of the ModuleSpecifier contained in FromClause.
  2. Let attributes be WithClauseToAttributes of WithClause.
  3. Return a ModuleRequest Record { [[Specifer]]: specifier, [[Attributes]]: attributes }.
ExportDeclaration : export @@ -2955,9 +2952,9 @@

16.2.1.3 Static Semantics: ModuleRequests

16.2.1.5 Cyclic 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.

-

In addition to the fields defined in Table 40 Cyclic Module Records have the additional fields listed in Table 3

-
Table 3: Additional Fields of Cyclic 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.

+

In addition to the fields defined in Table 40 Cyclic Module Records have the additional fields listed in Table 3

+
Table 3: Additional Fields of Cyclic Module Records
@@ -3003,7 +3000,7 @@

16.2.1.5 Cyclic Module Records

[[RequestedModules]]
- a List of StringsModuleRequest Records + a List of StringsModuleRequest 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 @@

16.2.1.5 Cyclic Module Records

[[LoadedModules]]
- a List of Records with fields [[Specifier]] (a String), [[Attributes]] (a List of ImportAttribute Records) and [[Module]] (a Module Record) + a List of Records with fields [[Specifier]] (a String), [[Attributes]] (a List of ImportAttribute Records) and [[Module]] (a Module Record) 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:

-
Table 4: ImportEntry Record Fields
+

An ImportEntry Record is a Record that digests information about a single declarative import. Each ImportEntry Record has the fields defined in Table 4:

+
Table 4: ImportEntry Record Fields
@@ -3116,26 +3113,26 @@

16.2.1.6 Source Text Module Records

16.2.1.8 HostLoadImportedModule ( referrer, specifier, moduleRequest, hostDefined, payload )

-

The host-defined abstract operation HostLoadImportedModule takes arguments referrer (a Script Record, a Cyclic Module Record, or a Realm Record), specifier (a String), moduleRequest (a ModuleRequest Record), hostDefined (anything), and payload (a GraphLoadingState Record or a PromiseCapability Record) and returns unused.

+

The host-defined abstract operation HostLoadImportedModule takes arguments referrer (a Script Record, a Cyclic Module Record, or a Realm Record), specifier (a String), moduleRequest (a ModuleRequest Record), hostDefined (anything), and payload (a GraphLoadingState Record or a PromiseCapability Record) and returns unused.

Note 1

An example of when referrer can be a Realm Record is in a web browser host. There, if a user clicks on a control given by

<button type="button" onclick="import('./foo.mjs')">Click me</button>
-

there will be no active script or module at the time the import() expression runs. More generally, this can happen in any situation where the host pushes execution contexts with null ScriptOrModule components onto the execution context stack.

+

there will be no active script or module at the time the import() expression runs. More generally, this can happen in any situation where the host pushes execution contexts with null ScriptOrModule components onto the execution context stack.

An implementation of HostLoadImportedModule must conform to the following requirements:

@@ -3154,25 +3151,25 @@

16.2.1.8 HostLoadImportedModule ( referrer<

16.2.1.9 FinishLoadingImportedModule ( referrer, specifier, moduleRequest, payload, result )

-

The abstract operation FinishLoadingImportedModule takes arguments 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), and result (either a normal completion containing a Module Record or a throw completion) and returns unused. It performs the following steps when called:

-
  1. If result is a normal completion, then
    1. If referrer.[[LoadedModules]] contains a Record record such that record.[[Specifier]] is specifiermoduleRequest.[[Specifier]] and AttributesEqual(record.[[Attributes]], moduleRequest.[[Attributes]]) is true, then
      1. Assert: record.[[Module]] is result.[[Value]].
    2. Else, append the Record { [[Specifier]]: specifiermoduleRequest.[[Specifer]], [[Attributes]]: moduleRequest.[[Attributes]], [[Module]]: result.[[Value]] } to referrer.[[LoadedModules]].
  2. If payload is a GraphLoadingState Record, then
    1. Perform ContinueModuleLoading(payload, result).
  3. Else,
    1. Perform ContinueDynamicImport(payload, result).
  4. Return unused.
+

The abstract operation FinishLoadingImportedModule takes arguments 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), and result (either a normal completion containing a Module Record or a throw completion) and returns unused. It performs the following steps when called:

+
  1. If result is a normal completion, then
    1. If referrer.[[LoadedModules]] contains a Record record such that record.[[Specifier]] is specifiermoduleRequest.[[Specifier]] and AttributesEqual(record.[[Attributes]], moduleRequest.[[Attributes]]) is true, then
      1. Assert: record.[[Module]] is result.[[Value]].
    2. Else, append the Record { [[Specifier]]: specifiermoduleRequest.[[Specifer]], [[Attributes]]: moduleRequest.[[Attributes]], [[Module]]: result.[[Value]] } to referrer.[[LoadedModules]].
  2. If payload is a GraphLoadingState Record, then
    1. Perform ContinueModuleLoading(payload, result).
  3. Else,
    1. Perform ContinueDynamicImport(payload, result).
  4. Return unused.
Editor's Note
-

The description of the [[LoadedModules]] field of Realm Record, Script Record, and Cyclic Module Record should be updated to include the [[Attributes]] field.

+

The description of the [[LoadedModules]] field of Realm Record, Script Record, and Cyclic Module Record should be updated to include the [[Attributes]] field.

16.2.1.9.1 AttributesEqual ( left, right )

-

The abstract operation AttributesEqual takes arguments left (a List of ImportAttribute Records) and right (a List of ImportAttribute Records) and returns a Boolean. It performs the following steps when called:

+

The abstract operation AttributesEqual takes arguments left (a List of ImportAttribute Records) and right (a List of ImportAttribute Records) and returns a Boolean. It performs the following steps when called:

-
  1. If the number of elements in left is not the same as the number of elements in right, return false.
  2. For each ImportAttribute Record r of left, do
    1. Let found be false.
    2. For each ImportAttribute Record s of right, do
      1. If r.[[Key]] is s.[[Key]] and r.[[Value]] is s.[[Value]], then
        1. Set found to true.
    3. If found is false, return false.
  3. Return true.
+
  1. If the number of elements in left is not the same as the number of elements in right, return false.
  2. For each ImportAttribute Record r of left, do
    1. Let found be false.
    2. For each ImportAttribute Record s of right, do
      1. If r.[[Key]] is s.[[Key]] and r.[[Value]] is s.[[Value]], then
        1. Set found to true.
    3. If found is false, return false.
  3. Return true.

16.2.1.10 AllImportAttributesSupported ( attributes )

-

The abstract operation AllImportAttributesSupported takes argument attributes (a List of ImportAttribute Records) and returns a Boolean. It performs the following steps when called:

-
  1. Let supported be HostGetSupportedImportAttributes().
  2. For each Record attribute of attributes, do
    1. If supported does not contain attribute.[[Key]], return false.
  3. 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:

+
  1. Let supported be HostGetSupportedImportAttributes().
  2. For each Record attribute of attributes, do
    1. If supported does not contain attribute.[[Key]], return false.
  3. Return true.

16.2.1.10.1 HostGetSupportedImportAttributes ( )

@@ -3215,14 +3212,14 @@

16.2.2 Imports

ImportClause FromClause [no LineTerminator here] - WithClause + WithClause ; import ModuleSpecifier [no LineTerminator here] - WithClause + WithClause ; @@ -3235,23 +3232,23 @@

16.2.2 Imports

with { - WithEntries + WithEntries ,opt } WithEntries : - AttributeKey + AttributeKey : StringLiteral - AttributeKey + AttributeKey : StringLiteral , - WithEntries + WithEntries @@ -3265,7 +3262,7 @@

16.2.2 Imports

Note
-

This section is extended by 16.2.2.3.

+

This section is extended by 16.2.2.3.

@@ -3275,25 +3272,25 @@

16.2.2.1 Static Semantics: Early Errors

WithClause : with { - WithEntries + WithEntries ,opt }
Note
-

This section is extended by 16.2.2.3.

+

This section is extended by 16.2.2.3.

16.2.2.2 Static Semantics: WithClauseToAttributes

-

The syntax-directed operation WithClauseToAttributes takes no arguments and returns a List of ImportAttribute Records. It is defined piecewise over the following productions:

+

The syntax-directed operation WithClauseToAttributes takes no arguments and returns a List of ImportAttribute Records. It is defined piecewise over the following productions:

WithClause : @@ -3309,38 +3306,38 @@

16.2.2.2 Static Semantics: WithClauseToAttr WithClause : with { - WithEntries + WithEntries ,opt } -
  1. Let attributes be WithClauseToAttributes of WithEntries.
  2. 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.
  3. Return attributes.
+
  1. Let attributes be WithClauseToAttributes of WithEntries.
  2. 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.
  3. Return attributes.
WithEntries : - AttributeKey + AttributeKey : StringLiteral -
  1. Let key be StringValue of AttributeKey.
  2. Let entry be the ImportAttribute Record { [[Key]]: key, [[Value]]: StringValue of StringLiteral }.
  3. Return « entry ».
+
  1. Let key be StringValue of AttributeKey.
  2. Let entry be the ImportAttribute Record { [[Key]]: key, [[Value]]: StringValue of StringLiteral }.
  3. Return « entry ».
WithEntries : - AttributeKey + AttributeKey : StringLiteral , - WithEntries + WithEntries -
  1. Let key be StringValue of AttributeKey.
  2. Let entry be the ImportAttribute Record { [[Key]]: key, [[Value]]: StringValue of StringLiteral }.
  3. Let rest be WithClauseToAttributes of WithEntries.
  4. Return the list-concatenation of « entry » and rest.
+
  1. Let key be StringValue of AttributeKey.
  2. Let entry be the ImportAttribute Record { [[Key]]: key, [[Value]]: StringValue of StringLiteral }.
  3. Let rest be WithClauseToAttributes of WithEntries.
  4. Return the list-concatenation of « entry » and rest.
Note
-

This section is extended by 16.2.2.3.

+

This section is extended by 16.2.2.3.

@@ -3349,21 +3346,21 @@

16.2.2.3 Deprecated assert key

Import Attributes are denoted using the with keyword. However, there are existing implementations based on a previous version of the proposal using the assert keyword. Due to potential web compatibility risks, the assert keyword is still included in this specification, but its removal is being investigated.

-

The following augments the ImportDeclaration production in 16.2.2:

+

The following augments the ImportDeclaration production in 16.2.2:

ImportDeclaration : import ImportClause FromClause [no LineTerminator here] - AssertClause + AssertClause ; import ModuleSpecifier [no LineTerminator here] - AssertClause + AssertClause ; @@ -3376,30 +3373,30 @@

16.2.2.3 Deprecated assert key assert { - WithEntries + WithEntries ,opt } -

The static semantics of Early Errors in 16.2.2.1 are augmented with the following:

+

The static semantics of Early Errors in 16.2.2.1 are augmented with the following:

AssertClause : assert { - WithEntries + WithEntries ,opt } -

The static semantics of WithClauseToAttributes in 16.2.2.2 are augmented with the following:

+

The static semantics of WithClauseToAttributes in 16.2.2.2 are augmented with the following:

AssertClause : assert @@ -3414,13 +3411,13 @@

16.2.2.3 Deprecated assert key AssertClause : assert { - WithEntries + WithEntries ,opt } -
  1. Let attributes be WithClauseToAttributes of WithEntries.
  2. 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.
  3. Return attributes.
+
  1. Let attributes be WithClauseToAttributes of WithEntries.
  2. 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.
  3. Return attributes.
@@ -3439,7 +3436,7 @@

16.2.3 Exports

ExportFromClause FromClause [no LineTerminator here] - WithClause + WithClause ;
@@ -3489,8 +3486,8 @@

A Sample host integration: The Web embedding

  • 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
  • @@ -3089,11 +3086,11 @@

    16.2.1.6 Source Text Module Records

    String - ModuleRequest Record + ModuleRequest Record - String value of the ModuleSpecifier of the ImportDeclaration. - ModuleRequest Record representing the ModuleSpecifier and import attributes of the ImportDeclaration. + String value of the ModuleSpecifier of the ImportDeclaration. + ModuleRequest Record representing the ModuleSpecifier and import attributes of the ImportDeclaration.