mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +01:00
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:
parent
dfbd5b7d21
commit
576c7445b8
9 changed files with 72 additions and 70 deletions
|
@ -622,7 +622,11 @@ impl HTMLIFrameElementMethods<crate::DomTypeHolder> for HTMLIFrameElement {
|
|||
can_gc,
|
||||
)?;
|
||||
// Step 2: Set an attribute value given this, srcdoc's local name, and compliantString.
|
||||
element.set_attribute(local_name, AttrValue::String(value), can_gc);
|
||||
element.set_attribute(
|
||||
local_name,
|
||||
AttrValue::String(value.as_ref().to_owned()),
|
||||
can_gc,
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue