HTMLSelectElement.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2020, the SerenityOS developers.
  3. * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
  4. * Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
  5. *
  6. * SPDX-License-Identifier: BSD-2-Clause
  7. */
  8. #pragma once
  9. #include <LibWeb/HTML/FormAssociatedElement.h>
  10. #include <LibWeb/HTML/HTMLElement.h>
  11. namespace Web::HTML {
  12. class HTMLSelectElement final : public FormAssociatedElement {
  13. public:
  14. using WrapperType = Bindings::HTMLSelectElementWrapper;
  15. HTMLSelectElement(DOM::Document&, DOM::QualifiedName);
  16. virtual ~HTMLSelectElement() override;
  17. // ^FormAssociatedElement
  18. // https://html.spec.whatwg.org/multipage/forms.html#category-listed
  19. virtual bool is_listed() const override { return true; }
  20. // https://html.spec.whatwg.org/multipage/forms.html#category-submit
  21. virtual bool is_submittable() const override { return true; }
  22. // https://html.spec.whatwg.org/multipage/forms.html#category-reset
  23. virtual bool is_resettable() const override { return true; }
  24. // https://html.spec.whatwg.org/multipage/forms.html#category-autocapitalize
  25. virtual bool is_auto_capitalize_inheriting() const override { return true; }
  26. // ^HTMLElement
  27. // https://html.spec.whatwg.org/multipage/forms.html#category-label
  28. virtual bool is_labelable() const override { return true; }
  29. private:
  30. // ^DOM::Node
  31. virtual void inserted() override;
  32. virtual void removed_from(DOM::Node*) override;
  33. };
  34. }