1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 19:25:07 +00:00

LibWeb: Make DOMImplementation.createHTMLDocument() create HTMLDocument

Prior to this change, this API would actually create an XML Document(!)
This commit is contained in:
Andreas Kling 2024-03-09 20:57:15 +01:00
parent b9bacb3ff4
commit 99ca2ccf08
5 changed files with 28 additions and 2 deletions

View file

@ -27,4 +27,10 @@ JS::NonnullGCPtr<HTMLDocument> HTMLDocument::create(JS::Realm& realm, URL const&
return realm.heap().allocate<HTMLDocument>(realm, realm, url);
}
void HTMLDocument::initialize(JS::Realm& realm)
{
Base::initialize(realm);
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLDocumentPrototype>(realm, "HTMLDocument"_fly_string));
}
}