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:
Tim van der Lippe 2025-08-22 21:41:50 +02:00 committed by GitHub
parent f1a5da6836
commit 10ac177aa5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 52 additions and 85 deletions

View file

@ -3876,8 +3876,7 @@ impl ElementMethods<crate::DomTypeHolder> for Element {
.iter()
.any(|c| matches!(*c, b'&' | b'\0' | b'<' | b'\r'))
{
Node::SetTextContent(&target, Some(value), can_gc);
return Ok(());
return Node::SetTextContent(&target, Some(value), can_gc);
}
// Step 3: Let fragment be the result of invoking the fragment parsing algorithm steps