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

LibWeb: Add createDocument and createDocumentType for DOMImplementation

Both required for the acid3 test.
createDocument is used extensively in Web Platform Tests.
This commit is contained in:
Luke 2021-05-04 21:40:31 +01:00 committed by Linus Groh
parent 5952bc1ea4
commit 7c6c7ca542
4 changed files with 58 additions and 3 deletions

View file

@ -25,7 +25,10 @@ public:
return adopt_ref(*new DOMImplementation(document));
}
const NonnullRefPtr<Document> create_html_document(const String& title) const;
// FIXME: Add optional DocumentType once supported by IDL
NonnullRefPtr<Document> create_document(const String&, const String&) const;
NonnullRefPtr<Document> create_html_document(const String& title) const;
NonnullRefPtr<DocumentType> create_document_type(const String&, const String&, const String&) const;
// https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
bool has_feature() const { return true; }