Skip to content

Commit

Permalink
Move module map to Document/WorkerGlobalScope
Browse files Browse the repository at this point in the history
Fixes #892.
  • Loading branch information
domenic committed Mar 23, 2016
1 parent d0711b0 commit 9a889fe
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions source
Expand Up @@ -8450,6 +8450,10 @@ partial /*sealed*/ interface <dfn>Document</dfn> {
list of <span>Content Security Policy</span> objects active in this context. The list is empty
unless otherwise specified.</p>

<p>The <code>Document</code> has a <dfn data-dfn-for="Document"
data-x="concept-document-module-map">module map</dfn>, which is a <span>module map</span>,
initially empty.</p>


<h4><dfn>Resource metadata management</dfn></h4>

Expand Down Expand Up @@ -76682,6 +76686,15 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {

</dd>


<dt>The <span>module map</span></dt>
<dd>

<p>Return the <span data-x="concept-document-module-map">module map</span> of the
<code>Document</code> with which <var>window</var> is currently associated.</p>

</dd>

<dt>The <span>responsible browsing context</span></dt>
<dd>

Expand Down Expand Up @@ -84809,14 +84822,11 @@ interface <dfn>NavigatorOnLine</dfn> {

</dd>

<dt>A <dfn>module map</dfn></dt>
<dt>A <span>module map</span></dt>

<dd>

<p>A map of <span>absolute URL</span>s to values that are either a <span>module script</span>,
null, or a placeholder value "<code data-x="">fetching</code>". The map must be initially
empty. It is used to ensure that imported JavaScript modules are only fetched, parsed, and
evaluated once.</p>
<p>Used when importing JavaScript modules.</p>

</dd>

Expand Down Expand Up @@ -85675,6 +85685,12 @@ interface <dfn>NavigatorOnLine</dfn> {
scripts</span> versus <span data-x="module script">module scripts</span>, since both of them use
the <code>script</code> element.</p>

<p>A <dfn>module map</dfn> is a map of <span>absolute URL</span>s to values that are either a
<span>module script</span>, null, or a placeholder value "<code data-x="">fetching</code>".
<span data-x="module map">Module maps</span> are used to ensure that imported JavaScript modules
are only fetched, parsed, and evaluated once per <code>Document</code> or <span
data-x="Worker">worker</span>.</p>

<p>To <dfn>resolve a module specifier</dfn> given a <span>module script</span> <var>script</var>
and a string <var>specifier</var>, perform the following steps. It will return either an
<span>absolute URL</span> or failure.</p>
Expand Down Expand Up @@ -94176,6 +94192,10 @@ interface <dfn>WorkerGlobalScope</dfn> : <span>EventTarget</span> {
<p>A <code>WorkerGlobalScope</code> object has an associated <dfn data-dfn-for="WorkerGlobalScope"
data-x="concept-WorkerGlobalScope-csp-list">CSP list</dfn>. It is initially an empty list.

<p>A <code>WorkerGlobalScope</code> object has an associated <dfn data-dfn-for="WorkerGlobalScope"
data-x="concept-WorkerGlobalScope-module-map">module map</dfn>. It is a <span>module map</span>,
initially empty.</p>

<p>The <dfn><code data-x="dom-WorkerGlobalScope-self">self</code></dfn> attribute must return the
<code>WorkerGlobalScope</code> object itself.</p>

Expand Down Expand Up @@ -94760,10 +94780,11 @@ interface <dfn>AbstractWorker</dfn> {

</dd>

<dt>The <span>global object</span></dt>
<dt>The <span>module map</span></dt>
<dd>

<p>Return <var>worker global scope</var>.</p>
<p>Return <var>worker global scope</var>'s <span
data-x="concept-WorkerGlobalScope-module-map">module map</span>.</p>

</dd>

Expand Down

0 comments on commit 9a889fe

Please sign in to comment.