HTMLOutputElement.h 1.4 KB

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