File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 127
127
// No XMLHttpRequest.response ?
128
128
(function checkXMLHttpRequestResponseCompatibility () {
129
129
var xhrPrototype = XMLHttpRequest .prototype ;
130
+ if (!('overrideMimeType' in xhrPrototype )) {
131
+ // IE10 might have response, but not overrideMimeType
132
+ Object .defineProperty (xhrPrototype , 'overrideMimeType' , {
133
+ value : function xmlHttpRequestOverrideMimeType (mimeType ) {}
134
+ });
135
+ }
130
136
if ('response' in xhrPrototype ||
131
137
'mozResponseArrayBuffer' in xhrPrototype ||
132
138
'mozResponse' in xhrPrototype ||
133
139
'responseArrayBuffer' in xhrPrototype )
134
140
return ;
135
- // IE ?
141
+ // IE9 ?
136
142
if (typeof VBArray !== 'undefined' ) {
137
143
Object .defineProperty (xhrPrototype , 'response' , {
138
144
get : function xmlHttpRequestResponseGet () {
139
145
return new Uint8Array (new VBArray (this .responseBody ).toArray ());
140
146
}
141
147
});
142
- Object .defineProperty (xhrPrototype , 'overrideMimeType' , {
143
- value : function xmlHttpRequestOverrideMimeType (mimeType ) {}
144
- });
145
148
return ;
146
149
}
147
150
You can’t perform that action at this time.
0 commit comments