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