← Back to release summary

form.requestSubmit()

Category
DOM
Type
New or changed feature
Status
Enabled by default (Chrome 76)
Intent stage
Evaluate readiness to ship

Summary

Adds the form.requestSubmit() function, which requests form submission. It includes interactive constraint validation, dispatches a 'submit' event, and takes a reference to the submitter button.

Motivation

https://github.com/whatwg/html/issues/4187 requestSubmit() exposes what click() implementation of built-in submit buttons do. It would be helpful to make developer's own submit buttons. form.submit() was not enough because it doesn't trigger interactive constraint validation, doesn't dispatch 'submit' event, and doesn't make a form data entry for the submit button.

Standards & signals

Docs: https://html.spec.whatwg.org/C/forms.html#dom-form-requestsubmit-dev

Explainers: https://html.spec.whatwg.org/C/forms.html#dom-form-requestsubmit-dev

View on chromestatus.com