Skip to content

Instantly share code, notes, and snippets.

@javascripto
Created May 13, 2020 16:44
Show Gist options
  • Select an option

  • Save javascripto/5ca17881566c4383e4085e8f06305625 to your computer and use it in GitHub Desktop.

Select an option

Save javascripto/5ca17881566c4383e4085e8f06305625 to your computer and use it in GitHub Desktop.
HTMLFormElement.prototype.serialize = function() {
const formData = new FormData(this);
return Object.fromEntries(formData.entries());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment