← Back to release summary

Add optional submitter parameter to FormData constructor

Category
Miscellaneous
Type
Chromium catches up
Status
Enabled by default (Chrome 112)
Intent stage
Prepare to ship

WPT details: https://wpt.fyi/results/xhr/formdata/constructor-submitter.html?label=master&label=experimental&aligned&view=subtest&q=constructor-submitter

Summary

Allow passing a submit button to the FormData constructor. If the button has a name or is an image button, it will contribute to the form data set. This makes it possible to create a FormData object with the same data set as a vanilla form submission triggered by the button.

Standards & signals

Ecosystem

View on chromestatus.com