[whatwg] Adding FormData support to <form>

Maciej Stachowiak mjs at apple.com
Fri Feb 26 14:28:12 PST 2010


On Feb 26, 2010, at 11:37 AM, Michael Nordman wrote:

>
>
> Sure, but a better name could help a bit. For example, this produces  
> a 'shared' object:
>
> document.getElementById("foo")
>
> while this creates a new one:
>
> myFormElement.getFormData()
>
> It might be ok, but it is a bit inconsistent.
>
> Why not:
> formData = new FormData();
> formData = new FormData(myFormElement);
>
> ah... +1 the ctor

Indeed, constructor syntax makes it very clear that you are getting a  
new object. I like.

  - Maciej

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100226/5d33a7f1/attachment-0002.htm>


More information about the whatwg mailing list