2023-06-21 13:53:09 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <LibWeb/HTML/HTMLDocument.h>
|
|
|
|
|
|
|
|
namespace Web::HTML {
|
|
|
|
|
2023-11-19 19:47:52 +01:00
|
|
|
JS_DECLARE_ALLOCATOR(HTMLDocument);
|
|
|
|
|
2023-06-21 13:53:09 +02:00
|
|
|
HTMLDocument::HTMLDocument(JS::Realm& realm, AK::URL const& url)
|
|
|
|
: Document(realm, url)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
HTMLDocument::~HTMLDocument() = default;
|
|
|
|
|
|
|
|
WebIDL::ExceptionOr<JS::NonnullGCPtr<HTMLDocument>> HTMLDocument::construct_impl(JS::Realm& realm)
|
|
|
|
{
|
|
|
|
return HTMLDocument::create(realm);
|
|
|
|
}
|
|
|
|
|
2023-08-13 13:05:26 +02:00
|
|
|
JS::NonnullGCPtr<HTMLDocument> HTMLDocument::create(JS::Realm& realm, AK::URL const& url)
|
2023-06-21 13:53:09 +02:00
|
|
|
{
|
2023-08-13 13:05:26 +02:00
|
|
|
return realm.heap().allocate<HTMLDocument>(realm, realm, url);
|
2023-06-21 13:53:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|