HTMLInputElement.h 632 B

123456789101112131415161718192021
  1. #pragma once
  2. #include <LibHTML/DOM/HTMLElement.h>
  3. class HTMLInputElement : public HTMLElement {
  4. public:
  5. HTMLInputElement(Document&, const String& tag_name);
  6. virtual ~HTMLInputElement() override;
  7. virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const override;
  8. String type() const { return attribute("type"); }
  9. String value() const { return attribute("value"); }
  10. String name() const { return attribute("name"); }
  11. };
  12. template<>
  13. inline bool is<HTMLInputElement>(const Node& node)
  14. {
  15. return is<Element>(node) && to<Element>(node).tag_name().to_lowercase() == "input";
  16. }