Skip to content

Commit 508706c

Browse files
authored
Set the fragment scripting mode based on the context document
Closes #12254.
1 parent 0045b78 commit 508706c

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

source

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145705,9 +145705,12 @@ console.assert(container.firstChild instanceof SuperP);
145705145705
<li><p>Let <var>document</var> be a <code>Document</code> node whose <span
145706145706
data-x="concept-document-type">type</span> is "<code data-x="">html</code>".</p></li>
145707145707

145708-
<li><p>If <var data-x="concept-frag-parse-context">context</var>'s <span>node document</span> is
145709-
in <span>quirks mode</span>, then set <var>document</var>'s <span
145710-
data-x="concept-document-mode">mode</span> to "<code data-x="">quirks</code>".</p></li>
145708+
<li><p>Let <var>contextDocument</var> be <var data-x="concept-frag-parse-context">context</var>'s
145709+
<span>node document</span>.</p></li>
145710+
145711+
<li><p>If <var>contextDocument</var> is in <span>quirks mode</span>, then set
145712+
<var>document</var>'s <span data-x="concept-document-mode">mode</span> to "<code
145713+
data-x="">quirks</code>".</p></li>
145711145714

145712145715
<li><p>Otherwise, if <var data-x="concept-frag-parse-context">context</var>'s <span>node
145713145716
document</span> is in <span>limited-quirks mode</span>, then set <var>document</var>'s <span
@@ -145719,15 +145722,11 @@ console.assert(container.firstChild instanceof SuperP);
145719145722

145720145723
<li><p>Create a new <span>HTML parser</span>, and associate it with <var>document</var>.</p></li>
145721145724

145722-
<li>
145723-
<p>If <var>document</var>'s <span
145724-
data-x="concept-n-script">scripting is enabled</span>, then set the parser's
145725-
<span>scripting mode</span> to <var>scriptingMode</var>.</p>
145725+
<li><p>If <var>contextDocument</var>'s <span data-x="concept-n-script">scripting is
145726+
disabled</span>, then set <var>scriptingMode</var> to <span
145727+
data-x="scripting-mode-disabled">Disabled</span>.</p></li>
145726145728

145727-
<p class="XXX">This appears broken, as the document created for fragment parsing does not have a
145728-
browsing context, which would make it parse <code>noscript</code> as if scripting was disabled.
145729-
See <a href="https://github.com/whatwg/html/issues/12254">issue #12254</a>.</p>
145730-
</li>
145729+
<li><p>Set the parser's <span>scripting mode</span> to <var>scriptingMode</var>.</p></li>
145731145730

145732145731
<li>
145733145732
<p>Set the state of the <span>HTML parser</span>'s <span>tokenization</span> stage as

0 commit comments

Comments
 (0)