W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

Re: [XHR2] FormData for <form>

From: Jian Li <jianli@chromium.org>
Date: Tue, 14 Sep 2010 11:07:52 -0700
Message-ID: <AANLkTimmdhWe=pxUcRN5u78QDmUev8QGP9iVATaGgSA2@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Alex Russell <slightlyoff@google.com>, Webapps WG <public-webapps@w3.org>
"new FormData(myformelement)" sounds good.


On Tue, Sep 14, 2010 at 11:00 AM, Jonas Sicking <jonas@sicking.cc> wrote:

> Note that you can always do:
>
> fd = new FormData;
>
> That is agreed by everyone to work. The question is how to instantiate
> one which is prefilled with the data from a <form>.
>
> / Jonas
>
> On Tue, Sep 14, 2010 at 10:55 AM, Alex Russell <slightlyoff@google.com>
> wrote:
> > I have a preference for the second syntax. These sorts of classes
> > should always be "new"-able.
> >
> > On Tue, Sep 14, 2010 at 10:46 AM, Jonas Sicking <jonas@sicking.cc>
> wrote:
> >> Hi All,
> >>
> >> There was some discussions regarding the syntax for generating a
> >> FormData object based on the data in an existing <form>. I had
> >> proposed the following syntax
> >>
> >> myformelement.getFormData();
> >>
> >> however it was pointed out that the downside with this API is that
> >> it's not clear that a new FormData object is created every time.
> >> Instead the following syntax was proposed:
> >>
> >> new FormData(myformelement);
> >>
> >> however I don't see this syntax in the new XHR L2 drafts. Is this
> >> merely an oversight or was the omission intentional?
> >>
> >> I'm fine with either syntax, but since we're getting close to shipping
> >> Firefox 4, and I'd like to include this functionality (in fact, it's
> >> been shipping for a long time in betas), I'd like to see if how much
> >> consensus the various proposals carried.
> >>
> >> / Jonas
> >>
> >>
> >
>
>
Received on Tuesday, 14 September 2010 18:08:22 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:40 GMT