Skip to content

Instantly share code, notes, and snippets.

@alonisser
Created May 21, 2013 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alonisser/5618646 to your computer and use it in GitHub Desktop.
Save alonisser/5618646 to your computer and use it in GitHub Desktop.
a whatwg suggestion to solve to double sumbitting forms problem
//a crude polyfill to handle this functionality
[OverrideBuiltins]
interface HTMLFormElement : HTMLElement {
attribute DOMString acceptCharset;
attribute DOMString action;
attribute DOMString autocomplete;
attribute DOMString enctype;
attribute DOMString encoding;
attribute DOMString method;
attribute DOMString name;
attribute boolean noValidate;
attribute DOMString target;
readonly attribute HTMLFormControlsCollection elements;
readonly attribute long length;
getter Element (unsigned long index);
getter object (DOMString name);
void submit();
void reset();
boolean checkValidity();
};
@alonisser
Copy link
Author

A suggestion for a whatwg spec change for html forms

Meant to help handling the double submission problem.

pre-alpha. nothing here yet

game plan:

  • Write the new DOM interface with the new attributes
  • research the form events
  • write the actuall polyfill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment