mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 08:11:13 +00:00
LibWeb: Make DOMImplementation IDL return an XMLDocument
Which the implementation was already doing, so no behaviour change :^)
This commit is contained in:
parent
f7beea1397
commit
a8e3400a2a
Notes:
sideshowbarker
2024-07-17 11:30:05 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/a8e3400a2a Pull-request: https://github.com/SerenityOS/serenity/pull/24377 Reviewed-by: https://github.com/tcl3
|
@ -48,7 +48,7 @@ void DOMImplementation::visit_edges(Cell::Visitor& visitor)
|
|||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<Document>> DOMImplementation::create_document(Optional<FlyString> const& namespace_, String const& qualified_name, JS::GCPtr<DocumentType> doctype) const
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<XMLDocument>> DOMImplementation::create_document(Optional<FlyString> const& namespace_, String const& qualified_name, JS::GCPtr<DocumentType> doctype) const
|
||||
{
|
||||
// 1. Let document be a new XMLDocument
|
||||
auto xml_document = XMLDocument::create(realm());
|
||||
|
|
|
@ -21,7 +21,7 @@ public:
|
|||
[[nodiscard]] static JS::NonnullGCPtr<DOMImplementation> create(Document&);
|
||||
virtual ~DOMImplementation();
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<Document>> create_document(Optional<FlyString> const&, String const&, JS::GCPtr<DocumentType>) const;
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<XMLDocument>> create_document(Optional<FlyString> const&, String const&, JS::GCPtr<DocumentType>) const;
|
||||
JS::NonnullGCPtr<Document> create_html_document(Optional<String> const& title) const;
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<DocumentType>> create_document_type(String const& qualified_name, String const& public_id, String const& system_id);
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#import <DOM/Document.idl>
|
||||
#import <DOM/XMLDocument.idl>
|
||||
|
||||
// https://dom.spec.whatwg.org/#domimplementation
|
||||
[Exposed=Window]
|
||||
interface DOMImplementation {
|
||||
|
||||
// FIXME: This should return XMLDocument instead of Document.
|
||||
[NewObject] Document createDocument([FlyString] DOMString? namespace, [LegacyNullToEmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
|
||||
[NewObject] XMLDocument createDocument([FlyString] DOMString? namespace, [LegacyNullToEmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
|
||||
[NewObject] Document createHTMLDocument(optional DOMString title);
|
||||
[NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId);
|
||||
|
||||
|
|
Loading…
Reference in a new issue