W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

Re: XHR responseArrayBuffer attribute: suggestion to replace "asBlob" with "responseType"

From: David Flanagan <david@davidflanagan.com>
Date: Wed, 10 Nov 2010 17:14:23 -0800
Message-ID: <4CDB436F.2060805@davidflanagan.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: Chris Rogers <crogers@google.com>, Boris Zbarsky <bzbarsky@mit.edu>, public-webapps@w3.org, Jonas Sicking <jonas@sicking.cc>, Maciej Stachowiak <mjs@apple.com>, Geoffrey Garen <ggaren@apple.com>, Darin Fisher <darin@chromium.org>, Anne van Kesteren <annevk@opera.com>, Eric Uhrhane <ericu@google.com>, michaeln@google.com, Alexey Proskuryakov <ap@webkit.org>, jorlow@google.com, jamesr@chromium.org
On 11/10/2010 03:00 PM, Tab Atkins Jr. wrote:
>> So you prefer that .responseType take a string value as opposed to an
>> integer enum value?  Darin Fisher had the idea that introspection of the
>> supported values would be easier as an enum.
> Yes, I think using an enum would be *extremely* verbose, particularly
> given this particular API's name.  I don't want to see or type code
> like:
> myXHR.responseType = XMLHttpResponse.RESPONSETYPE_ARRAYBUFFER;
> This is much better:
> myXHR.responseType = "arraybuffer";
> ~TJ

You can have consise and introspectable values if the verbose constants 
have string values instead of integers, of course.

Received on Thursday, 11 November 2010 01:15:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:13 UTC