[webkit-dev] XHR responseArrayBuffer attribute: possible implementation
Chris Rogers
crogers at google.com
Mon Oct 25 14:54:34 PDT 2010
passing "undefined" as the 4th and 5th arguments seems pretty clunky to me.
Since, we already have an "asBlob" attribute, then "asArrayBuffer" like
Darin suggests seems like it might be better. However, then we can get into
cases where both "asBlob" and "asArrayBuffer" are set, and this problem
would get even worse as new types are added. So, an attribute called
"responseType" might be a good solution. This would be instead of passing
it as an argument to open(), and instead of having an "asBlob" attribute.
This approach seems the cleanest to me, and I'll propose it to the
appropriate standards group.
Chris
On Mon, Oct 25, 2010 at 12:45 PM, Alexey Proskuryakov <ap at webkit.org> wrote:
>
> 25.10.2010, в 12:34, Chris Marrin написал(а):
>
> request.open("GET", "data.xml", true, "Text");
>> request.open("GET", "data.xml", true, "XML");
>> request.open("GET", "data.xml", true, "Bytes");
>>
>
> I'd sure like to try to avoid an explosion in the API. I like Geoff's
> suggestion of specifying the type of request in open(). Seems like the best
> API would be to have Geoff's API and then:
>
>
> Note that open() has username and password as its 4th and 5th arguments.
> So, you'd have to call it like request.open("GET", "data.xml", true,
> undefined, undefined, "Bytes");
>
> - WBR, Alexey Proskuryakov
>
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20101025/0e1153c0/attachment.html>
More information about the webkit-dev
mailing list