summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-08-08 22:29:40 +0200
committerAndreas Kling <kling@serenityos.org>2022-09-06 00:27:09 +0200
commit7c3db526b0b7a9f516499b00e901ec55c695c02e (patch)
treece8243216d2b0446c35447db92d7991a1439e626 /Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
parenta4ddb0ef8746be22b07fce3cc67b9664a4bd01ef (diff)
downloadserenity-7c3db526b0b7a9f516499b00e901ec55c695c02e.zip
LibWeb: Make DOM::Event and all its subclasses GC-allocated
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
index b678522bd2..6f1b96b9ea 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp
@@ -65,10 +65,10 @@ void HTMLFormElement::submit_form(RefPtr<HTMLElement> submitter, bool from_submi
SubmitEventInit event_init {};
event_init.submitter = submitter_button;
- auto submit_event = SubmitEvent::create(EventNames::submit, event_init);
+ auto submit_event = SubmitEvent::create(document().preferred_window_object(), EventNames::submit, event_init);
submit_event->set_bubbles(true);
submit_event->set_cancelable(true);
- bool continue_ = dispatch_event(submit_event);
+ bool continue_ = dispatch_event(*submit_event);
m_firing_submission_events = false;