mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 03:29:49 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
47
Libraries/LibWeb/DOM/DOMImplementation.h
Normal file
47
Libraries/LibWeb/DOM/DOMImplementation.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright (c) 2020, the SerenityOS developers.
|
||||
* Copyright (c) 2022, Andreas Kling <andreas@ladybird.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Heap/GCPtr.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
class DOMImplementation final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(DOMImplementation, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(DOMImplementation);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static JS::NonnullGCPtr<DOMImplementation> create(Document&);
|
||||
virtual ~DOMImplementation();
|
||||
|
||||
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);
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
|
||||
bool has_feature() const
|
||||
{
|
||||
// The hasFeature() method steps are to return true.
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
explicit DOMImplementation(Document&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
Document& document() { return m_document; }
|
||||
Document const& document() const { return m_document; }
|
||||
|
||||
JS::NonnullGCPtr<Document> m_document;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue