Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to implement and ship FormData on workers

39 views
Skip to first unread message

nsm.n...@gmail.com

unread,
Jan 29, 2015, 5:10:36 PM1/29/15
to
Summary: The FormData interface allows sending forms directly via XHR. It has previously been exposed on window. This intent is to expose it on workers and allow the same usage, i.e:
- Creating FormData objects and adding string values or blobs to them
- Sending FormData objects via a call to xhr.send().

It is not possible to directly create a FormData from a HTML form element since form elements are not available on workers.

The exposure on workers is a requirement for the Fetch API which we intend to ship this quarter. [1]

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=739173

Link to standard: https://xhr.spec.whatwg.org/#interface-formdata

Platform coverage: All platforms
Estimated or target release: Firefox 38
Pref: I intend to hide this behind dom.fetch.enabled, which also controls the Fetch specification.

[1]: https://groups.google.com/forum/#!searchin/mozilla.dev.platform/intent$20fetch/mozilla.dev.platform/EWGghGeRAV0/2DWWR-KPa_IJ

Xidorn Quan

unread,
Jan 29, 2015, 6:35:00 PM1/29/15
to nsm.n...@gmail.com, dev-pl...@lists.mozilla.org
Personally, I don't think it needs to be hidden behind a pref. Given that
FormData has been exposed on window, and the usage is mostly identical, I
suggest it be shipped directly.

- Xidorn
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>

Kyle Huey

unread,
Jan 29, 2015, 7:11:11 PM1/29/15
to Xidorn Quan, dev-pl...@lists.mozilla.org, nsm.n...@gmail.com
On Fri, Jan 30, 2015 at 8:34 AM, Xidorn Quan <quanx...@gmail.com> wrote:

> Personally, I don't think it needs to be hidden behind a pref. Given that
> FormData has been exposed on window, and the usage is mostly identical, I
> suggest it be shipped directly.
>
> - Xidorn
>
> On Fri, Jan 30, 2015 at 9:10 AM, <nsm.n...@gmail.com> wrote:
>
> > _______________________________________________
> > dev-platform mailing list
> > dev-pl...@lists.mozilla.org
> > https://lists.mozilla.org/listinfo/dev-platform
> >
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>

+1 No pref.

- Kyle

Boris Zbarsky

unread,
Jan 29, 2015, 9:41:53 PM1/29/15
to
On 1/29/15 5:10 PM, nsm.n...@gmail.com wrote:
> Pref: I intend to hide this behind dom.fetch.enabled, which also controls the Fetch specification.

May I ask why? This seems like a totally reasonable thing to expose
independently of Fetch, and might be good to have it in a release before
Fetch, even.

-Boris

nsm.n...@gmail.com

unread,
Jan 30, 2015, 1:30:39 AM1/30/15
to
Well my work on getting FormData on workers was because Fetch uses it, and there doesn't seem to have been demand for it on workers before.

Blink does not implement it yet (and doesn't seem to have activity on the bug[1]). I don't know about IE/Safari. If there are no compat issues, I'm happy to just ship it.

[1]: https://code.google.com/p/chromium/issues/detail?id=89532&q=formdata%20worker&colspec=ID%20Pri%20M%20Week%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20Modified

Boris Zbarsky

unread,
Jan 30, 2015, 10:13:30 AM1/30/15
to
On 1/30/15 1:30 AM, nsm.n...@gmail.com wrote:
> Well my work on getting FormData on workers was because Fetch uses it, and there doesn't seem to have been demand for it on workers before.

That's fair, but it seems like exposing it separately, if it's going to
be ready before the rest of Fetch, reduces the risks and doesn't have
much in the way of downsides that I see.

> If there are no compat issues, I'm happy to just ship it.

I can't think of obvious compat issues here offhand.

-Boris

Tantek Çelik

unread,
Jan 31, 2015, 12:36:25 AM1/31/15
to dev-pl...@lists.mozilla.org
On Fri, Jan 30, 2015 at 7:13 AM, Boris Zbarsky <bzba...@mit.edu> wrote:
> On 1/30/15 1:30 AM, nsm.n...@gmail.com wrote:
>>
>> Well my work on getting FormData on workers was because Fetch uses it, and
>> there doesn't seem to have been demand for it on workers before.
>
>
> That's fair, but it seems like exposing it separately, if it's going to be
> ready before the rest of Fetch, reduces the risks and doesn't have much in
> the way of downsides that I see.

Yes it makes sense to expose a building block that Fetch uses, before
exposing Fetch.

>> If there are no compat issues, I'm happy to just ship it.
>
>
> I can't think of obvious compat issues here offhand.

Same here. +1 no pref.

Tantek
0 new messages