2023-06-21 13:53:09 +02:00
|
|
|
/*
|
2024-10-04 13:19:50 +02:00
|
|
|
* Copyright (c) 2023, Andreas Kling <andreas@ladybird.org>
|
2023-06-21 13:53:09 +02:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
2024-04-27 12:09:58 +12:00
|
|
|
#include <LibWeb/Bindings/HTMLDocumentPrototype.h>
|
2023-06-21 13:53:09 +02:00
|
|
|
#include <LibWeb/HTML/HTMLDocument.h>
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
GC_DEFINE_ALLOCATOR(HTMLDocument);
|
2023-11-19 19:47:52 +01:00
|
|
|
|
2024-03-18 16:22:27 +13:00
|
|
|
HTMLDocument::HTMLDocument(JS::Realm& realm, URL::URL const& url)
|
2023-06-21 13:53:09 +02:00
|
|
|
: Document(realm, url)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
HTMLDocument::~HTMLDocument() = default;
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
WebIDL::ExceptionOr<GC::Ref<HTMLDocument>> HTMLDocument::construct_impl(JS::Realm& realm)
|
2023-06-21 13:53:09 +02:00
|
|
|
{
|
|
|
|
return HTMLDocument::create(realm);
|
|
|
|
}
|
|
|
|
|
2024-11-15 04:01:23 +13:00
|
|
|
GC::Ref<HTMLDocument> HTMLDocument::create(JS::Realm& realm, URL::URL const& url)
|
2023-06-21 13:53:09 +02:00
|
|
|
{
|
2024-11-14 05:50:17 +13:00
|
|
|
return realm.create<HTMLDocument>(realm, url);
|
2023-06-21 13:53:09 +02:00
|
|
|
}
|
|
|
|
|
2024-03-09 20:57:15 +01:00
|
|
|
void HTMLDocument::initialize(JS::Realm& realm)
|
|
|
|
{
|
2024-03-16 13:13:08 +01:00
|
|
|
WEB_SET_PROTOTYPE_FOR_INTERFACE(HTMLDocument);
|
2025-04-20 16:22:57 +02:00
|
|
|
Base::initialize(realm);
|
2024-03-09 20:57:15 +01:00
|
|
|
}
|
|
|
|
|
2023-06-21 13:53:09 +02:00
|
|
|
}
|