Side navigation
#7248 closed enhancement (wontfix)
Opened October 19, 2010 07:03AM UTC
Closed April 16, 2011 08:48PM UTC
XHR response Blob support
| Reported by: | zealot0630@gmail.com | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | ajax | Version: | 1.4.3 |
| Keywords: | needsreview,ajaxrewrite | Cc: | |
| Blocked by: | Blocking: |
Description
Currently only text and XML is supported in jQuery, but XHR2 introduced a new blob response (http://www.w3.org/TR/XMLHttpRequest2/#the-responseblob-attribute). I think it is worth considering.
Attachments (0)
Change History (6)
Changed October 19, 2010 07:18AM UTC by comment:1
Changed October 19, 2010 06:33PM UTC by comment:2
| keywords: | → needsreview |
|---|
Bikeshed/feature creep. Marking for review.
Changed October 24, 2010 04:55PM UTC by comment:3
| component: | unfiled → ajax |
|---|---|
| priority: | undecided → low |
Changed December 07, 2010 06:22AM UTC by comment:4
There are a lot of things in XHR2 that would be useful. Probably good for a whole plugin to dump all sorts of usefulness onto $.ajax.
Changed December 27, 2010 10:37PM UTC by comment:5
| keywords: | needsreview → needsreview,ajaxrewrite |
|---|
Changed April 16, 2011 08:48PM UTC by comment:6
| resolution: | → wontfix |
|---|---|
| status: | new → closed |
Yeah, let's push this off to a plugin (since Ajax is extensible now) - and we can reintegrate it later.
patch
diff --git a/jquery-1.4.2.js b/jquery-1.4.2.js index 0c8b750..c7124b3 100644 --- a/jquery-1.4.2.js +++ b/jquery-1.4.2.js @@ -5346,7 +5346,7 @@ jQuery.extend({ httpData: function( xhr, type, s ) { var ct = xhr.getResponseHeader("content-type") || "", xml = type === "xml" || !type && ct.indexOf("xml") >= 0, - data = xml ? xhr.responseXML : xhr.responseText; + data = type === "blob" ? { type: ct, blob: xhr.responseBlob } : xml ? xhr.responseXML : xhr.responseText; if ( xml && data.documentElement.nodeName === "parsererror" ) { jQuery.error( "parsererror" );