You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Parsing behaviour of <ahref="#dfn-import">imports</a>is defined as a set of changes to the <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#parsing">HTML Parsing</a>.</p>
<p>In step 15 of <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#prepare-a-script">prepare a script</a>algorithm, modify the last part of condition which begins with <em>If element does not have a <code>src</code>attribute</em> to read:</p>
<p>... and the <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document"><code>Document</code></a>of the <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#html-parser">HTML parser</a>or<ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-xhtml-syntax.html#xml-parser">XML parser</a>that created the <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#the-script-element"><code>script</code></a> element <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-a-style-sheet-that-is-blocking-scripts">has a style sheet that is blocking scripts</a>or<ahref="#dfn-has-an-import-that-is-blocking-scripts">has an import that is blocking scripts</a></p>
<p>At the DOCTYPE part of section <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#the-initial-insertion-mode">12.2.5.4.1 The "initial" insertion mode</a>, modify text <q>if the document is not an iframe srcdoc document...</q>as follows</a>
<p>In sub-condition named <em>Otherwise</em> of condition <em>An end tag whose name is "script"</em> in <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#parsing-main-incdata">"text" insertion mode</a>, modify step 3 to read:</p>
<li>If the parser's <code><ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a></code><ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-a-style-sheet-that-is-blocking-scripts">has a style sheet that is blocking scripts</a> or <ahref="#dfn-has-an-import-that-is-blocking-scripts">has an import that is blocking scripts</a> or <em>the script</em>'s <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#ready-to-be-parser-executed">"ready to be parser-executed"</a> flag is not set: <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#spin-the-event-loop">spin the event loop</a> until the parser's <code><ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a></code><ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-no-style-sheet-that-is-blocking-scripts">has no style sheet that is blocking scripts</a> and <ahref="#dfn-has-no-import-that-is-blocking-scripts">has no import that is blocking scripts</a> and the script's <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#ready-to-be-parser-executed">"ready to be parser-executed"</a> flag is set.</li>
<p>Modify step 3 of steps that run following <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#prepare-a-script">preparing</a>the <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#the-script-element"><code>script</code></a>element to read:</p>
<li><p><ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#spin-the-event-loop">Spin the event loop</a> until the parser's <code><ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a></code><ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#has-no-style-sheet-that-is-blocking-scripts">has no style sheet that is blocking scripts</a>and<ahref="#dfn-has-no-import-that-is-blocking-scripts">has no import that is blocking scripts</a>and the <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#pending-parsing-blocking-script">pending parsing-blocking script</a>'s <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#ready-to-be-parser-executed">"ready to be parser-executed"</a>flag is set.</p></li>
<p>Add following condition to the list of <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#enabling-and-disabling-scripting">Enabling and disabling scripting</a>criteria:</p>
<li>Scripting is enabled for a <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#node">node</a>if the <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document">Document</a>object of the node is in the <ahref="#dfn-import-map">import map</a>.</li>
Modify the definition of <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-currentscript"><code>document.currentScript</code></a>
<h2id="style-imports">Style processing with Imports</h2>
477
+
<h2id="style-imports">导入的样式处理</h2>
484
478
485
-
<p>The contents of the <code><ahref="http://www.whatwg.org/specs/web-apps/current-work/#the-style-element">style</a></code> elements and
486
-
the external resources of the <code><ahref="http://www.whatwg.org/specs/web-apps/current-work/#the-link-element">link</a></code> elements in <ahref="#dfn-import">imports</a><strong>must</strong> be considered as input sources of the <ahref="http://www.w3.org/TR/CSS21/intro.html#processing-model">style processing model</a> of the <ahref="#dfn-master-document">master document</a>.</p>
<p>Between declarations from different documents, the document order in terms of <ahref="http://www.w3.org/TR/css3-cascade/#cascade-order">order of appearance</a> is defined by comparing two elements <var>x</var>, whose owner document is <var>Dx</var>, and <var>y</var>, whose owner document is <var>Dy</var>, as follows:</p>
0 commit comments