Skip to content

Commit ae28137

Browse files
dandclarkxtucljharb
authored
Stop referring to the things in a List as 'entries' (#112)
* Stop referring to the things in a list as 'entries' * Apply suggestions from code review Co-authored-by: Jordan Harband <[email protected]> Co-authored-by: Sven Sauleau <[email protected]> Co-authored-by: Jordan Harband <[email protected]>
1 parent 023a0aa commit ae28137

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ <h1>Runtime Semantics: Evaluation</h1>
101101
1. <ins>If Type(_value_) is not String, then</ins>
102102
1. <ins>Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, &laquo; a newly created *TypeError* object &raquo;).</ins>
103103
1. <ins>Return _promiseCapability_.[[Promise]].</ins>
104-
1. <ins>If _key_ is an entry of _supportedAssertions_, append { [[Key]]: _key_, [[Value]]: _value_ } to _assertions_.</ins>
105-
1. <ins>Sort _assertions_ by the code point order of the [[Key]] of each entry. NOTE: This sorting is observable only in that hosts are prohibited from distinguishing among assertions by the order they occur in.</ens>
104+
1. <ins>If _supportedAssertions_ contains _key_, append { [[Key]]: _key_, [[Value]]: _value_ } to _assertions_.</ins>
105+
1. <ins>Sort _assertions_ 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 assertions by the order they occur in.</ens>
106106
1. <ins>Let _moduleRequest_ be a new ModuleRequest Record { [[Specifier]]: _specifierString_, [[Assertions]]: _assertions_ }.</ins>
107107
1. Perform ! HostImportModuleDynamically(_referencingScriptOrModule_, <del>_specifierString_,</del> <ins>_moduleRequest_,</ins> _promiseCapability_).
108108
1. Return _promiseCapability_.[[Promise]].
@@ -259,15 +259,15 @@ <h1>Static Semantics: AssertClauseToAssertions</h1>
259259
<emu-grammar>AssertClause : `assert` `{` AssertEntries `,`? `}`</emu-grammar>
260260
<emu-alg>
261261
1. Let _assertions_ be AssertClauseToAssertions of |AssertEntries|.
262-
1. Sort _assertions_ by the code point order of the [[Key]] of each entry. NOTE: This sorting is observable only in that hosts are prohibited from distinguishing among assertions by the order they occur in.
262+
1. Sort _assertions_ 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 assertions by the order they occur in.
263263
1. Return _assertions_.
264264
</emu-alg>
265265

266266
<emu-grammar> AssertEntries : AssertionKey `:` StringLiteral </emu-grammar>
267267
<emu-alg>
268268
1. Let _supportedAssertions_ be !HostGetSupportedImportAssertions().
269269
1. Let _key_ be StringValue of |AssertionKey|.
270-
1. If _key_ is an entry of _supportedAssertions_,
270+
1. If _supportedAssertions_ contains _key_,
271271
1. Let _entry_ be a Record { [[Key]]: _key_, [[Value]]: StringValue of |StringLiteral| }.
272272
1. Return a new List containing the single element, _entry_.
273273
1. Otherwise, return a new empty List.
@@ -277,10 +277,10 @@ <h1>Static Semantics: AssertClauseToAssertions</h1>
277277
<emu-alg>
278278
1. Let _supportedAssertions_ be !HostGetSupportedImportAssertions().
279279
1. Let _key_ be StringValue of |AssertionKey|.
280-
1. If _key_ is an entry of _supportedAssertions_,
280+
1. If _supportedAssertions_ contains _key_,
281281
1. Let _entry_ be a Record { [[Key]]: _key_, [[Value]]: StringValue of |StringLiteral| }.
282282
1. Let _rest_ be AssertClauseToAssertions of |AssertEntries|.
283-
1. Return a new List containing _entry_ followed by the entries of _rest_.
283+
1. Return a new List containing _entry_ followed by the elements of _rest_.
284284
1. Otherwise, return AssertClauseToAssertions of |AssertEntries|.
285285
</emu-alg>
286286
</emu-clause>
@@ -548,7 +548,7 @@ <h1>Sample host integration: The Web embedding</h1>
548548

549549
<ul>
550550
<li>The <a href="https://html.spec.whatwg.org/#module-script">module script</a> would have an additional item, which would be the module type, as a string (e.g., *"json"*), or *undefined* for a JavaScript module.</li>
551-
<li>HostResolveImportedModule and HostImportModuleDynamically would take a ModuleRequest Record parameter in place of a specifier string, which would be passed down through several abstract operations to reach the <a href="https://html.spec.whatwg.org/#fetch-a-single-module-script">fetch a single module script</a> algorithm. Somewhere near the entrypoint, if the ModuleRequest Record's [[Assertions]] field has an entry _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.</li>
551+
<li>HostResolveImportedModule and HostImportModuleDynamically would take a ModuleRequest Record parameter in place of a specifier string, which would be passed down through several abstract operations to reach the <a href="https://html.spec.whatwg.org/#fetch-a-single-module-script">fetch a single module script</a> algorithm. Somewhere near the entrypoint, if the ModuleRequest Record's [[Assertions]] 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.</li>
552552
<li>In the <a href="https://html.spec.whatwg.org/#fetch-the-descendants-of-a-module-script">fetch the descendents of a module script</a> 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 assertion.</li>
553553
<li>"Fetch a single module script" would check the assertion in two places:
554554
<ul>

0 commit comments

Comments
 (0)