HTMLBodyElement.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #include <LibWeb/HTML/WindowEventHandlers.h>
  10. namespace Web::HTML {
  11. class HTMLBodyElement final
  12. : public HTMLElement
  13. , public WindowEventHandlers {
  14. WEB_PLATFORM_OBJECT(HTMLBodyElement, HTMLElement);
  15. public:
  16. virtual ~HTMLBodyElement() override;
  17. virtual void parse_attribute(DeprecatedFlyString const&, DeprecatedString const&) override;
  18. virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
  19. // https://www.w3.org/TR/html-aria/#el-body
  20. virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::generic; };
  21. private:
  22. HTMLBodyElement(DOM::Document&, DOM::QualifiedName);
  23. virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
  24. // ^HTML::GlobalEventHandlers
  25. virtual EventTarget& global_event_handlers_to_event_target(DeprecatedFlyString const& event_name) override;
  26. // ^HTML::WindowEventHandlers
  27. virtual EventTarget& window_event_handlers_to_event_target() override;
  28. RefPtr<CSS::ImageStyleValue> m_background_style_value;
  29. };
  30. }