HTMLDetailsElement.h 898 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2020, the SerenityOS developers.
  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 HTMLDetailsElement final : public HTMLElement {
  11. WEB_PLATFORM_OBJECT(HTMLDetailsElement, HTMLElement);
  12. public:
  13. virtual ~HTMLDetailsElement() override;
  14. // https://www.w3.org/TR/html-aria/#el-details
  15. virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::group; }
  16. // ^Element
  17. WebIDL::ExceptionOr<void> set_attribute(DeprecatedFlyString const& name, DeprecatedString const& value) override;
  18. void remove_attribute(DeprecatedFlyString const& name) override;
  19. void run_details_notification_task_steps();
  20. private:
  21. HTMLDetailsElement(DOM::Document&, DOM::QualifiedName);
  22. virtual void initialize(JS::Realm&) override;
  23. };
  24. }