Skip to content

Commit

Permalink
Editorial: make 'module type allowed' take a realm
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Oct 30, 2023
1 parent 3fa726a commit fcc54a3
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -104807,10 +104807,11 @@ document.querySelector("button").addEventListener("click", bound);
<var>moduleRequest</var>.</p></li>

<li><p><span>Assert</span>: the result of running the <span>module type allowed</span> steps
given <var>moduleType</var> and <var>settingsObject</var> is true. Otherwise we would not have
reached this point because a failure would have been raised when inspecting
<var>moduleRequest</var>.[[Attributes]] in <a href="#validate-requested-module-specifiers">create
a JavaScript module script</a> or <span>fetch a single imported module script</span>.</p></li>
given <var>moduleType</var> and <var>settingsObject</var>'s <span data-x="environment settings
object's realm">realm</span> is true. Otherwise we would not have reached this point because a
failure would have been raised when inspecting <var>moduleRequest</var>.[[Attributes]] in
<a href="#validate-requested-module-specifiers">create a JavaScript module script</a> or
<span>fetch a single imported module script</span>.</p></li>

<li><p>Let <var>moduleMap</var> be <var>settingsObject</var>'s <span
data-x="concept-settings-object-module-map">module map</span>.</p></li>
Expand Down Expand Up @@ -104953,8 +104954,8 @@ document.querySelector("button").addEventListener("click", bound);
request</span> steps given <var>moduleRequest</var>.</p></li>

<li><p>If the result of running the <span>module type allowed</span> steps given
<var>moduleType</var> and <var>settingsObject</var> is false, then run <var>onComplete</var>
given null, and return.</p></li>
<var>moduleType</var> and <var>settingsObject</var>'s <span data-x="environment settings object's
realm">realm</span> is false, then run <var>onComplete</var> given null, and return.</p></li>

<li><p><span>Fetch a single module script</span> given <var>url</var>, <var>fetchClient</var>,
<var>destination</var>, <var>options</var>, <var>settingsObject</var>, <var>referrer</var>,
Expand Down Expand Up @@ -105116,7 +105117,8 @@ document.querySelector("button").addEventListener("click", bound);

<li>
<p>If the result of running the <span>module type allowed</span> steps given
<var>moduleType</var> and <var>settings</var> is false, then:</p>
<var>moduleType</var> and <var>settings</var>'s <span data-x="environment settings object's
realm">realm</span> is false, then:</p>

<ol>
<li><p>Let <var>error</var> be a new <code>TypeError</code> exception.</p></li>
Expand Down Expand Up @@ -105241,16 +105243,15 @@ document.querySelector("button").addEventListener("click", bound);
</ol>

<p>The <dfn>module type allowed</dfn> steps, given a <span>string</span> <var>moduleType</var>
and an <span>environment settings object</span> <var>settings</var>, are as follows:</p>
and a <span>realm</span> <var>realm</var>, are as follows:</p>

<ol>
<li><p>If <var>moduleType</var> is not "<code data-x="">javascript</code>", "<code
data-x="">css</code>", or "<code data-x="">json</code>", then return false.</p></li>

<li><p>If <var>moduleType</var> is "<code data-x="">css</code>" and the
<code>CSSStyleSheet</code> interface is not <span data-x="idl-exposed">exposed</span> in
<var>settings</var>'s <span data-x="environment settings object's realm">realm</span>, then
return false.</p></li>
<var>realm</var>, then return false.</p></li>

<li><p>Return true.</p></li>
</ol>
Expand Down

0 comments on commit fcc54a3

Please sign in to comment.