1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 23:28:06 +02:00

Merge pull request #4866 from yurydelendik/issue4673

Removes mozResponseArrayBuffer
This commit is contained in:
Yury Delendik 2014-06-02 12:51:29 -05:00
commit 5ded0ea163
4 changed files with 10 additions and 22 deletions

View file

@ -160,9 +160,13 @@ if (typeof PDFJS === 'undefined') {
value: function xmlHttpRequestOverrideMimeType(mimeType) {}
});
}
if ('response' in xhr || 'responseArrayBuffer' in xhr) {
if ('responseType' in xhr) {
return;
}
// The worker will be using XHR, so we can save time and disable worker.
PDFJS.disableWorker = true;
// Support: IE9
if (typeof VBArray !== 'undefined') {
Object.defineProperty(xhrPrototype, 'response', {
@ -189,7 +193,7 @@ if (typeof PDFJS === 'undefined') {
for (i = 0; i < n; ++i) {
result[i] = text.charCodeAt(i) & 0xFF;
}
return result;
return result.buffer;
}
Object.defineProperty(xhrPrototype, 'response', { get: responseGetter });
})();