[Webkit-unassigned] [Bug 49633] Add .responseType and .response to XMLHttpRequest

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 16 17:14:52 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=49633





--- Comment #3 from Chris Rogers <crogers at google.com>  2010-11-16 17:14:52 PST ---
This is an initial patch of an implementation for the .responseType and .response attributes which are being discussed in the public webapps mailing list in this thread:
   Re: XHR responseArrayBuffer attribute: suggestion to replace "asBlob" with "responseType"

The idea is, after a call to open(), but before send() is called, optionally set xhr.responseType to one of the following:

"" // empty string is default behavior (text)
"text"
"document"
"blob"
"arraybuffer"


* The patch has been tested very basically to verify it's able to get binary data in an ArrayBuffer if .responseType is set to "arraybuffer".  Otherwise, the current XMLHttpRequest layout tests all pass.

* New layout tests still need to be added

* the return type on the .response attribute should by "Any" in the .idl, but I don't know how to do that and declare it as returning DOMString, but this doesn't matter since the custom getter ignores that and returns whatever type of object is appropriate.

* the custom bindings for V8 are not yet in the patch, but will closely match the JSC version.

* should we throw an exception or return an empty string if .responseText is accessed, but the .responseType does not match?  Currently I'm throwing an exception.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list