Skip to content

Instantly share code, notes, and snippets.

Avatar

Tobias Buschor nuxodin

View GitHub Profile
@nuxodin
nuxodin / requestSubmit_and_reportValidity.js
Last active Apr 17, 2020 — forked from mcshaz/reportValidity.js
reportValidity polyfill for IE 10, 11
View requestSubmit_and_reportValidity.js
if (!HTMLFormElement.prototype.requestSubmit) {
HTMLFormElement.prototype.requestSubmit = function(submitter) {
let submitBtn = submitter;
if (!submitBtn) {
submitBtn = document.createElement('input');
submitBtn.type = 'submit';
submitBtn.hidden = true;
this.appendChild(submitBtn);
}
submitBtn.click();
You can’t perform that action at this time.