Determine the initial state for fragment parsing using the scripting flag of the context element (#37704)

When parsing a html fragment, the initial parser state depends on
whether or not scripting is enabled. So far we've used the scripting
flag of the parser, but that is wrong - the parser's scripting flag is
always false, because the fragment document has no browsing context.
Instead we should use the scripting flag of the context element.

Testing: A new web platform test passes

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-06-26 22:40:13 +02:00 committed by GitHub
parent 4dded465a4
commit cbb0407ae6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 48 additions and 35 deletions

View file

@ -1,3 +0,0 @@
[tokenizer-modes-001.html]
[</noscript> should not break out of noscript.]
expected: FAIL