/* * Copyright (c) 2020, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Web::DOM { class DOMImplementation final : public RefCounted , public Weakable , public Bindings::Wrappable { public: using WrapperType = Bindings::DOMImplementationWrapper; static NonnullRefPtr create(Document& document) { return adopt_ref(*new DOMImplementation(document)); } // FIXME: Add optional DocumentType once supported by IDL NonnullRefPtr create_document(const String&, const String&) const; NonnullRefPtr create_html_document(const String& title) const; NonnullRefPtr create_document_type(const String&, const String&, const String&) const; // https://dom.spec.whatwg.org/#dom-domimplementation-hasfeature bool has_feature() const { return true; } private: explicit DOMImplementation(Document&); Document& m_document; }; }