@@ -87197,7 +87197,7 @@ interface <dfn>NavigatorOnLine</dfn> {
8719787197 a module specifier</span> given <var>module script</var> and <var>requested</var>.</p></li>
8719887198
8719987199 <li>
87200- <p>If the result is error :</p>
87200+ <p>If <var>url</var> is failure :</p>
8720187201
8720287202 <ol>
8720387203 <li><p>Let <var>error</var> be a new <code>TypeError</code> exception.</p></li>
@@ -88283,8 +88283,8 @@ document.querySelector("button").addEventListener("click", bound);
8828388283 scripts</span> versus <span data-x="module script">module scripts</span>, since both of them use
8828488284 the <code>script</code> element.</p>
8828588285
88286- <p>A <dfn>module map</dfn> is a <span data-x="ordered map">map</span> of <span data-x="absolute
88287- URL">absolute URLs </span> to values that are either a <span>module script</span>, null (used to
88286+ <p>A <dfn>module map</dfn> is a <span data-x="ordered map">map</span> of <span data-x="URL
88287+ record">URL records </span> to values that are either a <span>module script</span>, null (used to
8828888288 represent failed fetches), or a placeholder value "<code data-x="">fetching</code>". <span
8828988289 data-x="module map">Module maps</span> are used to ensure that imported JavaScript modules are
8829088290 only fetched, parsed, and evaluated once per <code>Document</code> or <a
@@ -88321,8 +88321,8 @@ import "https://example.com/foo/../module2.js";</pre>
8832188321 </div>
8832288322
8832388323 <p>To <dfn>resolve a module specifier</dfn> given a <span>module script</span> <var>script</var>
88324- and a string <var>specifier</var>, perform the following steps. It will return either an
88325- <span>absolute URL </span> or failure.</p>
88324+ and a string <var>specifier</var>, perform the following steps. It will return either a <span>URL
88325+ record </span> or failure.</p>
8832688326
8832788327 <ol>
8832888328 <li><p>Apply the <span>URL parser</span> to <var>specifier</var>. If the result is not failure,
@@ -88410,14 +88410,39 @@ import "https://example.com/foo/../module2.js";</pre>
8841088410 object</span>'s <span data-x="concept-settings-object-module-map">module map</span>.</p></li>
8841188411
8841288412 <li><p>Let <var>url</var> be the result of <span data-x="resolve a module specifier">resolving a
88413- module specifier</span> given <var>referencing module script</var> and <var>specifier</var>. If
88414- the result is failure, then throw a <code>TypeError</code> exception and abort these
88415- steps.</p></li>
88413+ module specifier</span> given <var>referencing module script</var> and
88414+ <var>specifier</var>.</p></li>
8841688415
88417- <li><p>Let <var>resolved module script</var> be <var>moduleMap</var>[<var>url</var>]. If no such
88418- entry <span data-x="map exists">exists</span>, or if <var>resolved module script</var> is null or
88419- "<code data-x="">fetching</code>", then throw a <code>TypeError</code> exception and abort these
88420- steps.</p></li>
88416+ <li><p>Assert: <var>url</var> is never failure, because <span data-x="resolve a module
88417+ specifier">resolving a module specifier</span> must have been previously successful with these
88418+ same two arguments during the appropriate invocation of <span>fetch the descendants of and
88419+ instantiate a module script</span>.</p></li>
88420+
88421+ <li><p>Let <var>resolved module script</var> be <var>moduleMap</var>[<var>url</var>]. (This entry
88422+ must <span data-x="map exists">exist</span> for us to have gotten to this point.)</p></li>
88423+
88424+ <li>
88425+ <p>If <var>resolved module script</var> is null, then throw a <code>TypeError</code>
88426+ exception and abort these steps.</p>
88427+
88428+ <div class="example">
88429+ <p>This occurs when we have previously tried to <span data-x="fetch a single module
88430+ script">fetch</span> <var>url</var>, and failed, but are now rediscovering that fact in a new
88431+ module script graph. For example, given a file <code data-x="">module.js</code> whose contents
88432+ are</p>
88433+
88434+ <pre>import "./404.js";</pre>
88435+
88436+ <p>then we could get here as part of <span data-x="fetch a module script graph">fetching the
88437+ graph</span> for the second <code>script</code> element in the following HTML:</p>
88438+
88439+ <pre><script type="module" src="404.js"></script>
88440+ <script type="module" src="module.js"></script></pre>
88441+ </div>
88442+ </li>
88443+
88444+ <li><p>Assert: <var>resolved module script</var> is a <span>module script</span> (i.e., is not
88445+ "<code data-x="">fetching</code>").</p></li>
8842188446
8842288447 <li><p>If <var>resolved module script</var>'s <span
8842388448 data-x="concept-module-script-state">state</span> is "<code data-x="">errored</code>", then throw
0 commit comments