LibWeb: Modify DomParser parseFromString to accept TrustedHTML

We made the internal changes to accept this new type, but we forgot to
expose it.
This commit is contained in:
Tete17 2025-10-31 20:35:07 +01:00 committed by Jelle Raaijmakers
parent 901afee50b
commit 42284f8006
Notes: github-actions[bot] 2025-12-01 08:55:42 +00:00
5 changed files with 8 additions and 9 deletions

View file

@ -39,7 +39,7 @@ void DOMParser::initialize(JS::Realm& realm)
}
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring
WebIDL::ExceptionOr<GC::Root<DOM::Document>> DOMParser::parse_from_string(Utf16String string, Bindings::DOMParserSupportedType type)
WebIDL::ExceptionOr<GC::Root<DOM::Document>> DOMParser::parse_from_string(TrustedTypes::TrustedHTMLOrString string, Bindings::DOMParserSupportedType type)
{
// 1. Let compliantString to the result of invoking the Get Trusted Type compliant string algorithm with
// TrustedHTML, this's relevant global object, string, "DOMParser parseFromString", and "script".