mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-29 07:48:47 +00:00
LibWeb: Add the submit event to HTMLFormElement
Also adds the ability to submit from JavaScript.
This commit is contained in:
parent
9950270808
commit
773df8826d
Notes:
sideshowbarker
2024-07-19 01:18:31 +09:00
Author: https://github.com/Lubrsi
Commit: 773df8826d
Pull-request: https://github.com/SerenityOS/serenity/pull/4131
Reviewed-by: https://github.com/awesomekling
10 changed files with 120 additions and 4 deletions
|
@ -55,8 +55,7 @@ void HTMLInputElement::did_click_button(Badge<Layout::ButtonBox>)
|
|||
|
||||
if (type().equals_ignoring_case("submit")) {
|
||||
if (auto* form = first_ancestor_of_type<HTMLFormElement>()) {
|
||||
// FIXME: Remove this const_cast once we have a non-const first_ancestor_of_type.
|
||||
form->submit(this);
|
||||
form->submit_form(this);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue