/src/serenity/Userland/Libraries/LibWeb/HTML/HTMLHtmlElement.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #pragma once |
8 | | |
9 | | #include <LibWeb/ARIA/Roles.h> |
10 | | #include <LibWeb/HTML/HTMLElement.h> |
11 | | |
12 | | namespace Web::HTML { |
13 | | |
14 | | class HTMLHtmlElement final : public HTMLElement { |
15 | | WEB_PLATFORM_OBJECT(HTMLHtmlElement, HTMLElement); |
16 | | JS_DECLARE_ALLOCATOR(HTMLHtmlElement); |
17 | | |
18 | | public: |
19 | | virtual ~HTMLHtmlElement() override; |
20 | | |
21 | | bool should_use_body_background_properties() const; |
22 | | |
23 | | // https://www.w3.org/TR/html-aria/#el-html |
24 | 0 | virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::document; } |
25 | | |
26 | | private: |
27 | | HTMLHtmlElement(DOM::Document&, DOM::QualifiedName); |
28 | | |
29 | | virtual void initialize(JS::Realm&) override; |
30 | 0 | virtual bool is_html_html_element() const override { return true; } |
31 | | }; |
32 | | |
33 | | } |
34 | | |
35 | | namespace Web::DOM { |
36 | | template<> |
37 | 0 | inline bool Node::fast_is<HTML::HTMLHtmlElement>() const { return is_html_html_element(); } |
38 | | } |