Skip to content

Commit

Permalink
Editorial: change "resolve a module specifier" to take a URL
Browse files Browse the repository at this point in the history
This is in preparation for #3295, which deals with cases when there is
no referencing script. In that case, we'll want to derive a URL and pass
it through.
  • Loading branch information
domfarolino authored and domenic committed Jul 9, 2018
1 parent 5a6930a commit 8176d05
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -87001,7 +87001,8 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {

<ol>
<li><p>Let <var>url</var> be the result of <span data-x="resolve a module specifier">resolving
a module specifier</span> given <var>module script</var> and <var>requested</var>.</p></li>
a module specifier</span> given <var>module script</var>'s <span
data-x="concept-script-base-url">base URL</span> and <var>requested</var>.</p></li>

<li><p>Assert: <var>url</var> is never failure, because <span data-x="resolve a module
specifier">resolving a module specifier</span> must have been <a
Expand Down Expand Up @@ -87119,10 +87120,11 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
<li><p>Let <var>childSpecifiers</var> be the value of <var>moduleScript</var>'s <span
data-x="concept-script-record">record</span>'s [[RequestedModules]] internal slot.</p></li>

<li><p>Let <var>childURLs</var> be the <span>list</span> obtained by calling <span>resolve a
module specifier</span> once for each item of <var>childSpecifiers</var>,
given <var>moduleScript</var> and that item. (None of these will ever fail, as otherwise
<var>moduleScript</var> would have been marked as itself having a parse error.)</p></li>
<li><p>Let <var>childURLs</var> be the <span>list</span> obtained by calling
<span>resolve a module specifier</span> once for each item of <var>childSpecifiers</var>, given
<var>moduleScript</var>'s <span data-x="concept-script-base-url">base URL</span> and that item.
(None of these will ever fail, as otherwise <var>moduleScript</var> would have been marked as
itself having a parse error.)</p></li>

<li><p>Let <var>childModules</var> be the <span>list</span> obtained by <span
data-x="map get">getting each value</span> in <var>moduleMap</var> whose key is given by an
Expand Down Expand Up @@ -87258,7 +87260,8 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {

<ol>
<li><p>Let <var>url</var> be the result of <span data-x="resolve a module specifier">resolving
a module specifier</span> given <var>script</var> and <var>requested</var>.</p></li>
a module specifier</span> given <var>script</var>'s <span data-x="concept-script-base-url">base
URL</span> and <var>requested</var>.</p></li>

<li>
<p>If <var>url</var> is failure, then:</p>
Expand Down Expand Up @@ -88216,7 +88219,7 @@ import "https://example.com/foo/../module2.js";</pre>
data-x="concept-SharedWorkerGlobalScope-constructor-url">constructor url</span>.</p>
</div>

<p>To <dfn>resolve a module specifier</dfn> given a <span>script</span> <var>script</var> and a
<p>To <dfn>resolve a module specifier</dfn> given a <span>URL</span> <var>base URL</var> and a
<span>JavaScript string</span> <var>specifier</var>, perform the following steps. It will return
either a <span>URL record</span> or failure.</p>

Expand All @@ -88237,8 +88240,7 @@ import "https://example.com/foo/../module2.js";</pre>
</li>

<li><p>Return the result of applying the <span>URL parser</span> to <var>specifier</var> with
<var>script</var>'s <span data-x="concept-script-base-url">base URL</span> as the base
URL.</p></li>
<var>base URL</var> as the base URL.</p></li>
</ol>

<div class="example" id="module-specifier-examples">
Expand Down Expand Up @@ -88308,7 +88310,8 @@ import "https://example.com/foo/../module2.js";</pre>
<span data-x="concept-settings-object-module-map">module map</span>.</p></li>

<li><p>Let <var>url</var> be the result of <span data-x="resolve a module specifier">resolving a
module specifier</span> given <var>referencing script</var> and <var>specifier</var>.</p></li>
module specifier</span> given <var>referencing script</var>'s <span
data-x="concept-script-base-url">base URL</span> and <var>specifier</var>.</p></li>

<li><p>Assert: <var>url</var> is never failure, because <span data-x="resolve a module
specifier">resolving a module specifier</span> must have been <a
Expand Down Expand Up @@ -88344,7 +88347,8 @@ import "https://example.com/foo/../module2.js";</pre>

<ol>
<li><p>Let <var>url</var> be the result of <span data-x="resolve a module specifier">resolving a
module specifier</span> given <var>referencing script</var> and <var>specifier</var>.</p></li>
module specifier</span> given <var>referencing script</var>'s <span
data-x="concept-script-base-url">base URL</span> and <var>specifier</var>.</p></li>

<li>
<p>If <var>url</var> is failure, then:</p>
Expand Down

0 comments on commit 8176d05

Please sign in to comment.