mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
f87041bf3a
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
33 lines
931 B
C++
33 lines
931 B
C++
/*
|
|
* Copyright (c) 2023, Andreas Kling <andreas@ladybird.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/DOM/Document.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
// NOTE: This class is not currently in the specifications but it *is* implemented by all major browsers.
|
|
// There is discussion about bringing it back:
|
|
// https://github.com/whatwg/html/issues/4792
|
|
// https://github.com/whatwg/dom/issues/221
|
|
class HTMLDocument final : public DOM::Document {
|
|
WEB_PLATFORM_OBJECT(HTMLDocument, DOM::Document);
|
|
GC_DECLARE_ALLOCATOR(HTMLDocument);
|
|
|
|
public:
|
|
virtual ~HTMLDocument() override;
|
|
|
|
[[nodiscard]] static GC::Ref<HTMLDocument> create(JS::Realm&, URL::URL const& url = "about:blank"sv);
|
|
WebIDL::ExceptionOr<GC::Ref<HTMLDocument>> construct_impl(JS::Realm&);
|
|
|
|
private:
|
|
virtual void initialize(JS::Realm&) override;
|
|
|
|
HTMLDocument(JS::Realm&, URL::URL const&);
|
|
};
|
|
|
|
}
|