mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibWeb: Implement HTMLFormElement::reset
This patch sets up the necessary infrastructure for implementing reset algorithms for form-associated controls.
This commit is contained in:
committed by
Andreas Kling
parent
2376385f0c
commit
7cc6ffe5b7
@@ -22,9 +22,14 @@ public:
|
||||
|
||||
void submit_form(JS::GCPtr<HTMLElement> submitter, bool from_submit_binding = false);
|
||||
|
||||
void reset_form();
|
||||
|
||||
// NOTE: This is for the JS bindings. Use submit_form instead.
|
||||
void submit();
|
||||
|
||||
// NOTE: This is for the JS bindings. Use submit_form instead.
|
||||
void reset();
|
||||
|
||||
void add_associated_element(Badge<FormAssociatedElement>, HTMLElement&);
|
||||
void remove_associated_element(Badge<FormAssociatedElement>, HTMLElement&);
|
||||
|
||||
@@ -38,6 +43,9 @@ private:
|
||||
|
||||
bool m_firing_submission_events { false };
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/forms.html#locked-for-reset
|
||||
bool m_locked_for_reset { false };
|
||||
|
||||
Vector<JS::GCPtr<HTMLElement>> m_associated_elements;
|
||||
|
||||
JS::GCPtr<DOM::HTMLCollection> mutable m_elements;
|
||||
|
||||
Reference in New Issue
Block a user