@@ -58354,9 +58354,14 @@ o............A....e
5835458354
5835558355 </li>
5835658356
58357- <li><p>If the element's <span>node document</span> is an <span>HTML module document</span>, then
58358- return. The script will be executed as part of <span
58359- data-x="js-Evaluate">module graph evaluation</span>.</p></li>
58357+ <li>
58358+ <p>If the element's <span>node document</span> is an <span>HTML module document</span>, then
58359+ return.</p>
58360+
58361+ <p class="note">This means that scripts that are dynamically added to an HTML Module document
58362+ will not execute. The scripts that were originally part of the HTML Module document at parse
58363+ time will be executed as part of <span data-x="js-Evaluate">module graph evaluation</span>.</p>
58364+ </li>
5836058365
5836158366 <li>
5836258367
@@ -79885,6 +79890,10 @@ interface <dfn>BarProp</dfn> {
7988579890 data-x="concept-document-bc">browsing context</span>'s <span>browsing context
7988679891 container</span>'s <span>node document</span>.</p></dd>
7988779892
79893+ <dt>If the <code>Document</code> is an <span>HTML Module document</span></dt>
79894+
79895+ <dd><p>The <span>origin</span> that the <code>Document</code> was assigned when it was created
79896+ during <span>ParseHTMLModule</span>.</p></dd>
7988879897
7988979898 <dt>If the <code>Document</code> was obtained in some other manner (e.g. a <code>Document</code>
7989079899 created using the <code data-x="dom-DOMImplementation-createDocument">createDocument()</code>
@@ -87249,7 +87258,7 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
8724987258 <p>For each <span>ScriptEntry</span> <var>scriptEntry</var> in
8725087259 <var>module</var>.[[RequestedModules]], do:</p>
8725187260 <ol>
87252- <li><p>If <var>scriptEntry</var>.[[ExternalScriptURL]] != null, continue to the next
87261+ <li><p>If <var>scriptEntry</var>.[[ExternalScriptURL]] is not null, continue to the next
8725387262 <span>ScriptEntry</span>.</p></li>
8725487263
8725587264 <li><p>Let <var>importedModule</var> be <var>scriptEntry</var>.[[InlineModuleRecord]]).</p>
@@ -88007,8 +88016,8 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
8800788016 <var>scriptEntries</var>:</p>
8800888017
8800988018 <ol>
88010- <li><p>If <var>scriptEntry</var>'s <span>ExternalScriptURL</span> is not null, then perform the
88011- following steps:</p>
88019+ <li><p>If <var>scriptEntry</var>'s <span>ExternalScriptURL</span> is not null, then perform
88020+ the following steps:</p>
8801288021
8801388022 <ol>
8801488023 <li><p>Let <var>childURL</var> be the result result of calling
@@ -88261,12 +88270,19 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
8826188270 <var>htmlModuleScript</var>) as the following:</p>
8826288271
8826388272 <ol>
88264- <li><p>Create a new <span>Document</span> node <var>document</var> whose
88265- <span data-x="concept-document-content-type">content type</span> is
88266- <code data-x="">text/html</code> and mark it as being an <span
88267- data-x="HTML documents">HTML document</span>. Let <var>document</var> be in
88268- <span>no-quirks mode</span>. <var>document</var> must be considered an
88269- <span>HTML module document</span>.</p></li>
88273+ <li>
88274+ <p>Create a new <span>Document</span> node <var>document</var> whose <span
88275+ data-x="concept-document-content-type">content type</span> is the
88276+ <span>HTML Module MIME type</span> and whose <span>origin</span> is
88277+ <var>htmlModuleScript</var>'s <span>settings object</span>'s <span>origin</span>, and mark it as
88278+ being an <span data-x="HTML documents">HTML document</span>. This <var>document</var> must be
88279+ considered an <span>HTML module document</span>.</p>
88280+
88281+ <p>TODO(HTMLModules): Discussion is still ongoing regarding whether the
88282+ <span>HTML Module MIME type</span> will be <code>text/html</code> or a new type introduced for
88283+ HTML Modules. See discussion <a
88284+ href="https://github.com/w3c/webcomponents/issues/742">here</a>.</p>
88285+ </li>
8827088286
8827188287 <li><p>Create a new <span>HTML parser</span>, and associate it with <var>document</var>.</p></li>
8827288288
@@ -88292,18 +88308,19 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
8829288308 <p>If <var>script</var> is inline:</p>
8829388309
8829488310 <ol>
88295- <li><p>Set <var>scriptEntry</var>.[[InlineModuleRecord]] = <var>script</var>'s
88311+ <li><p>Set <var>scriptEntry</var>.[[InlineModuleRecord]] to <var>script</var>'s
8829688312 <span>Source Text Module Record</span>.</p></li>
8829788313
88298- <li><p>Set <var>scriptEntry</var>.[[ExternalScriptURL]] = null.</p></li>
88314+ <li><p>Set <var>scriptEntry</var>.[[ExternalScriptURL]] to null.</p></li>
8829988315 </ol>
8830088316 <li>
8830188317 <p>Otherwise:</p>
8830288318
8830388319 <ol>
88304- <li><p>Set <var>scriptEntry</var>.[[InlineModuleRecord]] = null.</p></li>
88320+ <li><p>Set <var>scriptEntry</var>.[[InlineModuleRecord]] to null.</p></li>
8830588321
88306- <li><p>Set <var>scriptEntry</var>.[[ExternalScriptURL]] = *script’s* src URL.</p></li>
88322+ <li><p>Set <var>scriptEntry</var>.[[ExternalScriptURL]] to the value of <var>script</var>’s
88323+ <code data-x="attr-script-src">src</code> attribute.</p></li>
8830788324 </ol>
8830888325 </li>
8830988326 <li><p>Append <var>scriptEntry</var> to <var>scriptEntries</var>.</p></li>
@@ -107239,7 +107256,8 @@ document.body.appendChild(text);
107239107256 <dd>
107240107257
107241107258 <p>If the document is <em>not</em> <span>an <code>iframe</code> <code
107242- data-x="attr-iframe-srcdoc">srcdoc</code> document</span>, then this is a <span>parse
107259+ data-x="attr-iframe-srcdoc">srcdoc</code> document</span> nor an
107260+ <span>HTML module document</span>, then this is a <span>parse
107243107261 error</span>; set the <code>Document</code> to <span>quirks mode</span>.</p>
107244107262
107245107263 <p>In any case, switch the <span>insertion mode</span> to "<span data-x="insertion mode: before
0 commit comments