W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2010

[whatwg] Adding FormData support to <form>

From: Anne van Kesteren <annevk@opera.com>
Date: Sat, 27 Feb 2010 01:12:21 +0100
Message-ID: <op.u8reuuio64w2qv@annevk-t60>
On Fri, 26 Feb 2010 23:28:12 +0100, Maciej Stachowiak <mjs at apple.com>  
wrote:
> 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.

I could add this to XMLHttpRequest Level 2.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Friday, 26 February 2010 16:12:21 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:21 UTC