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

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.

 David

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