diff --git a/Userland/Libraries/LibWeb/HTML/FormControlInfrastructure.cpp b/Userland/Libraries/LibWeb/HTML/FormControlInfrastructure.cpp
index c261bb2be2b..bd28b553aa2 100644
--- a/Userland/Libraries/LibWeb/HTML/FormControlInfrastructure.cpp
+++ b/Userland/Libraries/LibWeb/HTML/FormControlInfrastructure.cpp
@@ -164,7 +164,7 @@ WebIDL::ExceptionOr>> construct_entry_list(J
// 7. Fire an event named formdata at form using FormDataEvent, with the formData attribute initialized to form data and the bubbles attribute initialized to true.
FormDataEventInit init {};
init.form_data = form_data;
- auto form_data_event = TRY(FormDataEvent::construct_impl(realm, HTML::EventNames::formdata, init));
+ auto form_data_event = TRY(FormDataEvent::construct_impl(realm, String::from_deprecated_string(HTML::EventNames::formdata).release_value_but_fixme_should_propagate_errors(), init));
form_data_event->set_bubbles(true);
form.dispatch_event(form_data_event);
diff --git a/Userland/Libraries/LibWeb/HTML/FormDataEvent.cpp b/Userland/Libraries/LibWeb/HTML/FormDataEvent.cpp
index aa5fa25f11f..1337970c231 100644
--- a/Userland/Libraries/LibWeb/HTML/FormDataEvent.cpp
+++ b/Userland/Libraries/LibWeb/HTML/FormDataEvent.cpp
@@ -10,13 +10,13 @@
namespace Web::HTML {
-WebIDL::ExceptionOr> FormDataEvent::construct_impl(JS::Realm& realm, DeprecatedString const& event_name, FormDataEventInit const& event_init)
+WebIDL::ExceptionOr> FormDataEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, FormDataEventInit const& event_init)
{
return MUST_OR_THROW_OOM(realm.heap().allocate(realm, realm, event_name, event_init));
}
-FormDataEvent::FormDataEvent(JS::Realm& realm, DeprecatedString const& event_name, FormDataEventInit const& event_init)
- : DOM::Event(realm, event_name, event_init)
+FormDataEvent::FormDataEvent(JS::Realm& realm, FlyString const& event_name, FormDataEventInit const& event_init)
+ : DOM::Event(realm, event_name.to_deprecated_fly_string(), event_init)
, m_form_data(event_init.form_data)
{
}
diff --git a/Userland/Libraries/LibWeb/HTML/FormDataEvent.h b/Userland/Libraries/LibWeb/HTML/FormDataEvent.h
index 3c2a4254e2f..cd32e213110 100644
--- a/Userland/Libraries/LibWeb/HTML/FormDataEvent.h
+++ b/Userland/Libraries/LibWeb/HTML/FormDataEvent.h
@@ -19,14 +19,14 @@ class FormDataEvent final : public DOM::Event {
WEB_PLATFORM_OBJECT(FormDataEvent, DOM::Event);
public:
- static WebIDL::ExceptionOr> construct_impl(JS::Realm&, DeprecatedString const& event_name, FormDataEventInit const& event_init);
+ static WebIDL::ExceptionOr> construct_impl(JS::Realm&, FlyString const& event_name, FormDataEventInit const& event_init);
virtual ~FormDataEvent() override;
JS::GCPtr form_data() const { return m_form_data; }
private:
- FormDataEvent(JS::Realm&, DeprecatedString const& event_name, FormDataEventInit const& event_init);
+ FormDataEvent(JS::Realm&, FlyString const& event_name, FormDataEventInit const& event_init);
JS::ThrowCompletionOr initialize(JS::Realm&) override;
diff --git a/Userland/Libraries/LibWeb/HTML/FormDataEvent.idl b/Userland/Libraries/LibWeb/HTML/FormDataEvent.idl
index 3b198d7658a..d21e8116d39 100644
--- a/Userland/Libraries/LibWeb/HTML/FormDataEvent.idl
+++ b/Userland/Libraries/LibWeb/HTML/FormDataEvent.idl
@@ -2,7 +2,7 @@
#import
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#the-formdataevent-interface
-[Exposed=Window]
+[Exposed=Window, UseNewAKString]
interface FormDataEvent : Event {
constructor(DOMString type, FormDataEventInit eventInitDict);