LibWeb: Implement implicit submission of HTMLFormElement

This commit is contained in:
Timothy Flynn 2024-01-31 13:26:01 -05:00 committed by Andrew Kaster
parent a17074422e
commit 5d1657f57f
Notes: sideshowbarker 2024-07-16 19:42:24 +09:00
5 changed files with 229 additions and 4 deletions

View file

@ -59,6 +59,7 @@ public:
UserNavigationInvolvement user_involvement = { UserNavigationInvolvement::None };
};
WebIDL::ExceptionOr<void> submit_form(JS::NonnullGCPtr<HTMLElement> submitter, SubmitFormOptions);
WebIDL::ExceptionOr<void> implicitly_submit_form();
void reset_form();
@ -117,6 +118,9 @@ private:
ErrorOr<void> mail_as_body(AK::URL parsed_action, Vector<XHR::FormDataEntry> entry_list, EncodingTypeAttributeState encoding_type, String encoding, JS::NonnullGCPtr<Navigable> target_navigable, Bindings::NavigationHistoryBehavior history_handling, UserNavigationInvolvement user_involvement);
void plan_to_navigate_to(AK::URL url, Variant<Empty, String, POSTResource> post_resource, JS::NonnullGCPtr<Navigable> target_navigable, Bindings::NavigationHistoryBehavior history_handling, UserNavigationInvolvement user_involvement);
FormAssociatedElement* default_button();
size_t number_of_fields_blocking_implicit_submission() const;
bool m_firing_submission_events { false };
// https://html.spec.whatwg.org/multipage/forms.html#locked-for-reset