1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:57:46 +00:00

LibWeb: Make XHR.response an actual XMLDocument for XML documents

Before this change, we were producing a generic DOM::Document, which
was not distinguishable from an XMLDocument by IDL interface type.
This commit is contained in:
Andreas Kling 2023-10-07 08:11:18 +02:00
parent 2b343c9508
commit 0762388709
5 changed files with 29 additions and 2 deletions

View file

@ -9,6 +9,11 @@
namespace Web::DOM {
JS::NonnullGCPtr<XMLDocument> XMLDocument::create(JS::Realm& realm, AK::URL const& url)
{
return realm.heap().allocate<XMLDocument>(realm, realm, url);
}
XMLDocument::XMLDocument(JS::Realm& realm, AK::URL const& url)
: Document(realm, url)
{

View file

@ -14,6 +14,7 @@ class XMLDocument final : public Document {
WEB_PLATFORM_OBJECT(XMLDocument, Document);
public:
static JS::NonnullGCPtr<XMLDocument> create(JS::Realm&, AK::URL const&);
virtual ~XMLDocument() override = default;
private: