Implement script prepare text for Trusted Types (#37466)

Recently added WPT tests for this are now mostly passing. The remaining
tests fail on importmap support.

Part of #36258

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
Tim van der Lippe 2025-06-15 00:33:25 +02:00 committed by GitHub
parent f963f2731d
commit c74a422e4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 46 additions and 221 deletions

View file

@ -654,6 +654,7 @@ impl ServoParser {
let script_nesting_level = self.script_nesting_level.get();
self.script_nesting_level.set(script_nesting_level + 1);
script.set_initial_script_text();
script.prepare(can_gc);
self.script_nesting_level.set(script_nesting_level);