Use DOMString for internal data of Trusted Types (#37472)

This avoids various conversions back and forth between DOMString and
String. By using DOMString consistently, we avoid these
double-conversions. The only caveat are the USVString which are
initially passed into
TrustedScriptURL.

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 16:12:33 +02:00 committed by GitHub
parent dfbd5b7d21
commit 576c7445b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 72 additions and 70 deletions

View file

@ -3783,7 +3783,9 @@ impl Document {
containing_class,
field,
can_gc,
)?;
)?
.as_ref()
.to_owned();
}
// Step 5: If lineFeed is true, append U+000A LINE FEED to string.
if line_feed {