The FormDataEvent() constructor creates a new FormDataEvent object.
new FormDataEvent(type, formEventInit)typeA string with the name of the event. It is case-sensitive and browsers always set it to formdata.
optionsAn object that, in addition of the properties defined in Event(), can have the following properties:
formDataA FormData object to pre-populate the FormDataEvent with. This would then be accessed through the FormDataEvent.formData property.
A new FormDataEvent object.
const fd = new FormData();
fd.append("test", "test");
const fdEv = new FormDataEvent("formdata", { formData: fd });
for (const value of fdEv.formData.values()) {
console.log(value);
}