TIL – submit() versus requestSubmit()

Today I learned (well, technically, a few days ago, the week has been a lot), that the web platform supports a requestSubmit method. Since the beginning of time (or the beginning of JavaScript), we’ve been able to submit forms like so: var myForm = document.getElementById('theform');myForm.submit(); I intentionally used getElementById there as a reminder of what we had before jQuery. Given that, why do we need another method? Two important requests. Reason the First # When using submit, any validation of form fields is completely skipped. Consider this form: <form method="post" id="theForm"> <p> <label for="name">Name</label> <input... more →
Posted in: JavaScript