Skip to content

Instantly share code, notes, and snippets.

View nuxodin's full-sized avatar

Tobias Buschor nuxodin

View GitHub Profile
@nuxodin
nuxodin / requestSubmit_and_reportValidity.js
Last active April 17, 2020 08:58 — forked from mcshaz/reportValidity.js
reportValidity polyfill for IE 10, 11
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();