HTMLOutputElement.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 HTMLOutputElement final
  12. : public HTMLElement
  13. , public FormAssociatedElement {
  14. FORM_ASSOCIATED_ELEMENT(HTMLElement, HTMLOutputElement)
  15. public:
  16. using WrapperType = Bindings::HTMLOutputElementWrapper;
  17. HTMLOutputElement(DOM::Document&, DOM::QualifiedName);
  18. virtual ~HTMLOutputElement() override;
  19. String const& type() const
  20. {
  21. static String output = "output";
  22. return output;
  23. }
  24. // ^FormAssociatedElement
  25. // https://html.spec.whatwg.org/multipage/forms.html#category-listed
  26. virtual bool is_listed() const override { return true; }
  27. // https://html.spec.whatwg.org/multipage/forms.html#category-autocapitalize
  28. virtual bool is_resettable() const override { return true; }
  29. // https://html.spec.whatwg.org/multipage/forms.html#category-autocapitalize
  30. virtual bool is_auto_capitalize_inheriting() const override { return true; }
  31. // ^HTMLElement
  32. // https://html.spec.whatwg.org/multipage/forms.html#category-label
  33. virtual bool is_labelable() const override { return true; }
  34. };
  35. }