LibWeb: Add basic support for <input type=checkbox>

This is implemented entirely inside LibWeb, there is no GUI::CheckBox
widget instantiated, unlike other input types. All input types should
be moved to this new style of implementation.
This commit is contained in:
Andreas Kling 2020-09-11 18:17:39 +02:00
parent d6889ecf35
commit f2431adf47
Notes: sideshowbarker 2024-07-19 02:45:51 +09:00
7 changed files with 195 additions and 1 deletions

View file

@ -42,6 +42,14 @@ public:
String type() const { return attribute(HTML::AttributeNames::type); }
String value() const { return attribute(HTML::AttributeNames::value); }
String name() const { return attribute(HTML::AttributeNames::name); }
bool checked() const { return m_checked; }
void set_checked(bool);
bool enabled() const;
private:
bool m_checked { false };
};
}