Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to Ship: form.requestSubmit()

47 views
Skip to first unread message

John Dai

unread,
Feb 14, 2020, 2:48:34 PM2/14/20
to dev-platform
In Firefox 75, I intend to turn form.requestSubmit() on by default.

Summary: 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. The difference between
form.submit() and form.requestSubmit() is that form.submit() submits the
form, bypassing interactive constraint validation and firing of the submit
event.


Bug: <https://bugzilla.mozilla.org/show_bug.cgi?id=1542784>
https://bugzilla.mozilla.org/show_bug.cgi?id=1552301

Standard: <https://github.com/whatwg/html/pull/3752>
https://html.spec.whatwg.org/C/forms.html#dom-form-requestsubmit

Platform coverage: all

Preference: dom.forms.requestsubmit.enabled

Devtools bug: N/A

Other browsers:

-

Blink: Chrome has shipped it since 76 (
https://www.chromestatus.com/feature/6097749495775232)
-

WebKit: Hasn't implemented yet AFAIK (
https://bugs.webkit.org/show_bug.cgi?id=197958)


web-platform-tests:

web-platform
<https://searchfox.org/mozilla-central/source/testing/web-platform>/tests
<https://searchfox.org/mozilla-central/source/testing/web-platform/tests>/
html
<https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html>
/semantics
<https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/semantics>
/forms
<https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/semantics/forms>
/the-form-element
<https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/semantics/forms/the-form-element>
/form-requestsubmit.html
<https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/semantics/forms/the-form-element/form-requestsubmit.html>

Secure contexts: this feature is not restricted to secure contexts. I don't

see any reasons to restrict it in secure contexts. If you have any concerns,

please let me know.

Is this feature enabled by default in sandboxed iframes?: Yes (though
obviously, it requires script and forms to work).

Bug to turn on by default:

https://bugzilla.mozilla.org/show_bug.cgi?id=1613360
0 new messages