HTMLTextAreaElement.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (c) 2020, the SerenityOS developers.
  3. * Copyright (c) 2022, Luke Wilde <lukew@serenityos.org>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <LibWeb/HTML/FormAssociatedElement.h>
  9. #include <LibWeb/HTML/HTMLElement.h>
  10. namespace Web::HTML {
  11. class HTMLTextAreaElement final
  12. : public HTMLElement
  13. , public FormAssociatedElement {
  14. FORM_ASSOCIATED_ELEMENT(HTMLElement, HTMLTextAreaElement)
  15. public:
  16. using WrapperType = Bindings::HTMLTextAreaElementWrapper;
  17. HTMLTextAreaElement(DOM::Document&, DOM::QualifiedName);
  18. virtual ~HTMLTextAreaElement() override;
  19. String const& type() const
  20. {
  21. static String textarea = "textarea";
  22. return textarea;
  23. }
  24. // ^EventTarget
  25. // https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute:the-textarea-element
  26. virtual bool is_focusable() const override { return true; }
  27. // ^FormAssociatedElement
  28. // https://html.spec.whatwg.org/multipage/forms.html#category-listed
  29. virtual bool is_listed() const override { return true; }
  30. // https://html.spec.whatwg.org/multipage/forms.html#category-submit
  31. virtual bool is_submittable() const override { return true; }
  32. // https://html.spec.whatwg.org/multipage/forms.html#category-reset
  33. virtual bool is_resettable() const override { return true; }
  34. // https://html.spec.whatwg.org/multipage/forms.html#category-autocapitalize
  35. virtual bool is_auto_capitalize_inheriting() const override { return true; }
  36. // ^HTMLElement
  37. // https://html.spec.whatwg.org/multipage/forms.html#category-label
  38. virtual bool is_labelable() const override { return true; }
  39. };
  40. }