HTMLHtmlElement.h 904 B

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