HTMLLabelElement.h 768 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2020, the SerenityOS developers.
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/HTML/HTMLElement.h>
  8. namespace Web::HTML {
  9. class HTMLLabelElement final : public HTMLElement {
  10. WEB_PLATFORM_OBJECT(HTMLLabelElement, HTMLElement);
  11. JS_DECLARE_ALLOCATOR(HTMLLabelElement);
  12. public:
  13. virtual ~HTMLLabelElement() override;
  14. virtual JS::GCPtr<Layout::Node> create_layout_node(CSS::StyleProperties) override;
  15. Optional<String> for_() const { return attribute(HTML::AttributeNames::for_); }
  16. JS::GCPtr<HTMLElement> control() const;
  17. JS::GCPtr<HTMLFormElement> form() const;
  18. private:
  19. HTMLLabelElement(DOM::Document&, DOM::QualifiedName);
  20. virtual void initialize(JS::Realm&) override;
  21. };
  22. }