/* * Copyright (c) 2020, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include namespace Web::DOM { class DOMImplementation final : public RefCountForwarder , public Weakable , public Bindings::Wrappable { public: using WrapperType = Bindings::DOMImplementationWrapper; static NonnullOwnPtr create(Badge, Document& document) { return adopt_own(*new DOMImplementation(document)); } ExceptionOr> create_document(String const&, String const&, RefPtr) const; NonnullRefPtr create_html_document(String const& title) const; ExceptionOr> 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 { return true; } private: explicit DOMImplementation(Document&); Document& document() { return ref_count_target(); } Document const& document() const { return ref_count_target(); } }; }