HTMLTextAreaElement.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. WEB_PLATFORM_OBJECT(HTMLTextAreaElement, HTMLElement);
  15. FORM_ASSOCIATED_ELEMENT(HTMLElement, HTMLTextAreaElement)
  16. public:
  17. virtual ~HTMLTextAreaElement() override;
  18. String const& type() const
  19. {
  20. static String textarea = "textarea";
  21. return textarea;
  22. }
  23. // ^EventTarget
  24. // https://html.spec.whatwg.org/multipage/interaction.html#the-tabindex-attribute:the-textarea-element
  25. virtual bool is_focusable() const override { return true; }
  26. // ^FormAssociatedElement
  27. // https://html.spec.whatwg.org/multipage/forms.html#category-listed
  28. virtual bool is_listed() const override { return true; }
  29. // https://html.spec.whatwg.org/multipage/forms.html#category-submit
  30. virtual bool is_submittable() const override { return true; }
  31. // https://html.spec.whatwg.org/multipage/forms.html#category-reset
  32. virtual bool is_resettable() const override { return true; }
  33. // https://html.spec.whatwg.org/multipage/forms.html#category-autocapitalize
  34. virtual bool is_auto_capitalize_inheriting() const override { return true; }
  35. // ^HTMLElement
  36. // https://html.spec.whatwg.org/multipage/forms.html#category-label
  37. virtual bool is_labelable() const override { return true; }
  38. private:
  39. HTMLTextAreaElement(DOM::Document&, DOM::QualifiedName);
  40. };
  41. }
  42. WRAPPER_HACK(HTMLTextAreaElement, Web::HTML)