2020-01-18 11:38:21 +03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 11:24:48 +03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 11:38:21 +03:00
|
|
|
*/
|
|
|
|
|
2019-09-29 17:24:57 +03:00
|
|
|
#pragma once
|
|
|
|
|
2023-01-29 01:23:16 +03:00
|
|
|
#include <LibWeb/ARIA/Roles.h>
|
2020-07-26 16:08:16 +03:00
|
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
2019-09-29 17:24:57 +03:00
|
|
|
|
2020-07-28 19:20:36 +03:00
|
|
|
namespace Web::HTML {
|
2020-03-07 12:27:02 +03:00
|
|
|
|
2020-07-28 04:54:19 +03:00
|
|
|
class HTMLHtmlElement final : public HTMLElement {
|
2022-08-28 14:42:07 +03:00
|
|
|
WEB_PLATFORM_OBJECT(HTMLHtmlElement, HTMLElement);
|
2023-11-19 21:47:52 +03:00
|
|
|
JS_DECLARE_ALLOCATOR(HTMLHtmlElement);
|
2020-07-27 07:04:26 +03:00
|
|
|
|
2022-08-28 14:42:07 +03:00
|
|
|
public:
|
2019-09-29 17:24:57 +03:00
|
|
|
virtual ~HTMLHtmlElement() override;
|
2021-05-13 16:39:30 +03:00
|
|
|
|
|
|
|
bool should_use_body_background_properties() const;
|
2021-10-27 18:58:57 +03:00
|
|
|
|
2022-11-29 02:58:13 +03:00
|
|
|
// https://www.w3.org/TR/html-aria/#el-html
|
2023-01-29 01:23:16 +03:00
|
|
|
virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::document; }
|
2022-11-29 02:58:13 +03:00
|
|
|
|
2021-10-27 18:58:57 +03:00
|
|
|
private:
|
2022-08-28 14:42:07 +03:00
|
|
|
HTMLHtmlElement(DOM::Document&, DOM::QualifiedName);
|
|
|
|
|
2023-08-07 09:41:28 +03:00
|
|
|
virtual void initialize(JS::Realm&) override;
|
2021-10-27 18:58:57 +03:00
|
|
|
virtual bool is_html_html_element() const override { return true; }
|
2019-09-29 17:24:57 +03:00
|
|
|
};
|
2019-10-06 21:37:39 +03:00
|
|
|
|
|
|
|
}
|
2021-10-27 18:58:57 +03:00
|
|
|
|
|
|
|
namespace Web::DOM {
|
|
|
|
template<>
|
|
|
|
inline bool Node::fast_is<HTML::HTMLHtmlElement>() const { return is_html_html_element(); }
|
|
|
|
}
|