mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
Propagate Trusted Types errors for Node.textContent (#38871)
Part of #36258 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
parent
f1a5da6836
commit
10ac177aa5
14 changed files with 52 additions and 85 deletions
|
@ -4982,7 +4982,7 @@ impl DocumentMethods<crate::DomTypeHolder> for Document {
|
|||
None => return,
|
||||
};
|
||||
|
||||
let elem = if root.namespace() == &ns!(svg) && root.local_name() == &local_name!("svg") {
|
||||
let node = if root.namespace() == &ns!(svg) && root.local_name() == &local_name!("svg") {
|
||||
let elem = root.upcast::<Node>().child_elements().find(|node| {
|
||||
node.namespace() == &ns!(svg) && node.local_name() == &local_name!("title")
|
||||
});
|
||||
|
@ -5036,7 +5036,7 @@ impl DocumentMethods<crate::DomTypeHolder> for Document {
|
|||
return;
|
||||
};
|
||||
|
||||
elem.SetTextContent(Some(title), can_gc);
|
||||
node.set_text_content_for_element(Some(title), can_gc);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-document-head
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue