Skip to content
Browse files

add support for IE 6. tar demo works in 6-9

it's really slow in 6 and 7, but good in 8, fast in 9
  • Loading branch information...
1 parent ee792c8 commit c80d8ebea60dfb8f135b7d1732e8108d9af53778 @scintill scintill committed
Showing with 7 additions and 3 deletions.
  1. +1 −0 jquery/jquery-1.7.1-binary-ajax.js
  2. +6 −3 src/jdataview.js
View
1 jquery/jquery-1.7.1-binary-ajax.js
@@ -8039,6 +8039,7 @@ jQuery.ajaxSettings.xhr = window.ActiveXObject ?
(function( xhr ) {
jQuery.extend( jQuery.support, {
ajax: !!xhr,
+ ajaxResponseType: !!xhr && ( "responseType" in xhr ),
cors: !!xhr && ( "withCredentials" in xhr )
});
})( jQuery.ajaxSettings.xhr() );
View
9 src/jdataview.js
@@ -451,10 +451,13 @@ if (typeof jQuery !== 'undefined' && jQuery.fn.jquery >= "1.6.2") {
});
jQuery.ajaxPrefilter('dataview', function(options, originalOptions, jqXHR) {
- if (!options.hasOwnProperty('xhrFields')) {
- options.xhrFields = {};
+ // trying to set the responseType on IE 6 causes an error
+ if (jQuery.support.ajaxResponseType) {
+ if (!options.hasOwnProperty('xhrFields')) {
+ options.xhrFields = {};
+ }
+ options.xhrFields.responseType = 'arraybuffer';
}
- options.xhrFields.responseType = 'arraybuffer';
options.mimeType = 'text/plain; charset=x-user-defined';
});
}

0 comments on commit c80d8eb

Please sign in to comment.
Something went wrong with that request. Please try again.