mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 22:49:47 +00:00
LibWeb: Adapt the parsing of script elements to accommodate TrustedTypes
This commit is contained in:
parent
f7c05013c7
commit
82f56e30ed
Notes:
github-actions[bot]
2025-09-16 08:58:34 +00:00
Author: https://github.com/tete17
Commit: 82f56e30ed
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6058
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/gmta ✅
2 changed files with 6 additions and 0 deletions
|
@ -3268,6 +3268,10 @@ void HTMLParser::handle_text(HTMLToken& token)
|
|||
// Increment the parser's script nesting level by one.
|
||||
increment_script_nesting_level();
|
||||
|
||||
// https://w3c.github.io/trusted-types/dist/spec/#setting-slot-values-from-parser
|
||||
// Set script’s script text value to its child text content.
|
||||
script->set_string_text(script->child_text_content());
|
||||
|
||||
// If the active speculative HTML parser is null, then prepare the script element script.
|
||||
// This might cause some script to execute, which might cause new characters to be inserted into the tokenizer,
|
||||
// and might cause the tokenizer to output more tokens, resulting in a reentrant invocation of the parser.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue