XMLHttpRequest2 in 2.5?

130 views
Skip to first unread message

Brandon Donnelson

unread,
Sep 24, 2012, 11:35:02 PM9/24/12
to google-we...@googlegroups.com
Does anybody know if XMLHttpRequest2 is in or slated for 2.5?

Brandon

Thomas Broyer

unread,
Sep 25, 2012, 4:27:51 AM9/25/12
to google-we...@googlegroups.com

On Tuesday, September 25, 2012 5:35:02 AM UTC+2, Brandon Donnelson wrote:
Does anybody know if XMLHttpRequest2 is in or slated for 2.5?

It depends what you mean by XMLHttpRequest2. responseType is here (was in RC1 already but was broken), with the ability to get the response as an ArrayBuffer, but that's it: no progress events, no send() overload for typed arrays, no withCredentials, etc. That being said, apart from progress events, everything can be accomplished really easily with JSNI (progress events too, we're using them in a project at work when uploading files).
I think the main problem is to provide a way to detect which features are available; it's easy for responseType='arraybuffer' because you can just test whether typed arrays are supported (all browsers supported by GWT implement either both or none), it's a bit less straightforward for other features.
For those in a controlled environment (our app only supports Firefox, so we didn't bother checking for feature availability), it's best to resort to JSNI: if you know what you're doing, well, do it, you know what you're doing anyway.

However, as always: patches welcome!

Brandon Donnelson

unread,
Sep 25, 2012, 11:12:35 AM9/25/12
to google-we...@googlegroups.com
Thanks Thomas. I'll see if I can find some time to contribute, I'll dig some more.
Reply all
Reply to author
Forward
0 new messages