1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 15:54:58 +00:00

LibWeb: Add the submit event to HTMLFormElement

Also adds the ability to submit from JavaScript.
This commit is contained in:
Luke 2020-11-21 21:53:18 +00:00 committed by Andreas Kling
parent 9950270808
commit 773df8826d
10 changed files with 120 additions and 4 deletions

View file

@ -41,7 +41,13 @@ public:
String action() const { return attribute(HTML::AttributeNames::action); }
String method() const { return attribute(HTML::AttributeNames::method); }
void submit(RefPtr<HTMLInputElement> submitter);
void submit_form(RefPtr<HTMLElement> submitter, bool from_submit_binding = false);
// NOTE: This is for the JS bindings. Use submit_form instead.
void submit();
private:
bool m_firing_submission_events { false };
};
}