W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2014

Re: [whatwg] Fetch: use separate methods instead of one `to` method in FetchBodyStream

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 16 Jun 2014 14:00:14 +0200
Message-ID: <CADnb78hAnPLHsEiGeFk6Zi7GadbeZ4rAVqhnjZkjxicUbudJjQ@mail.gmail.com>
To: Jussi Kalliokoski <jussi.kalliokoski@gmail.com>
Cc: WHATWG <whatwg@whatwg.org>
On Mon, Jun 16, 2014 at 12:57 PM, Jussi Kalliokoski
<jussi.kalliokoski@gmail.com> wrote:
> Another bad example of using strings for these kind of things, from much
> closer, is XHR's responseType where it's excruciatingly painful to try to
> detect for example whether responseType "json" (it may throw when you set
> it, it may result in the `error` event or it may silently fail and set the
> JSON as string to response) is supported, let alone "arraybuffer".

Those sound like bugs in the implementation. If a given value is not
supported, setting should not happen. (And in the case of to(), it'll

> Feature detection is not the only concern though, another one is that it
> encourages putting a lot of complexity behind one flag (just like
> responseType) which is likely to lead to interoperability issues.

It's not that much complexity really.

Received on Monday, 16 June 2014 12:00:40 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:21 UTC