HTMLOListElement.h 905 B

12345678910111213141516171819202122232425262728293031323334353637
  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. #include <LibWeb/WebIDL/Types.h>
  10. namespace Web::HTML {
  11. class HTMLOListElement final : public HTMLElement {
  12. WEB_PLATFORM_OBJECT(HTMLOListElement, HTMLElement);
  13. GC_DECLARE_ALLOCATOR(HTMLOListElement);
  14. public:
  15. virtual ~HTMLOListElement() override;
  16. // https://www.w3.org/TR/html-aria/#el-ol
  17. virtual Optional<ARIA::Role> default_role() const override { return ARIA::Role::list; }
  18. WebIDL::Long start();
  19. void set_start(WebIDL::Long start)
  20. {
  21. set_attribute(AttributeNames::start, String::number(start)).release_value_but_fixme_should_propagate_errors();
  22. }
  23. private:
  24. HTMLOListElement(DOM::Document&, DOM::QualifiedName);
  25. virtual void initialize(JS::Realm&) override;
  26. };
  27. }