We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb43e95 commit 4426e4bCopy full SHA for 4426e4b
src/library.js
@@ -253,8 +253,13 @@ LibraryManager.library = {
253
// TODO: Use mozResponseArrayBuffer, responseStream, etc. if available.
254
var xhr = new XMLHttpRequest();
255
xhr.open('GET', obj.url, false);
256
- xhr.responseType = 'arraybuffer'; // hint to the browser that we want binary data
257
- xhr.overrideMimeType('text/plain; charset=x-user-defined'); // another hint
+
+ // Some hints to the browser that we want binary data.
258
+ xhr.responseType = 'arraybuffer';
259
+ if (xhr.overrideMimeType) {
260
+ xhr.overrideMimeType('text/plain; charset=x-user-defined');
261
+ }
262
263
xhr.send(null);
264
if (xhr.status != 200 && xhr.status != 0) success = false;
265
if (xhr.response !== undefined) {
0 commit comments