1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Removes mozResponseArrayBuffer

This commit is contained in:
Yury Delendik 2014-05-29 12:26:16 -05:00
parent 825762f22a
commit 9c87fa24f7
4 changed files with 6 additions and 22 deletions

View file

@ -31,20 +31,6 @@ var JpxImage = (function JpxImageClosure() {
this.failOnCorruptedImage = false;
}
JpxImage.prototype = {
load: function JpxImage_load(url) {
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.responseType = 'arraybuffer';
xhr.onload = (function() {
// TODO catch parse error
var data = new Uint8Array(xhr.response || xhr.mozResponseArrayBuffer);
this.parse(data);
if (this.onload) {
this.onload();
}
}).bind(this);
xhr.send(null);
},
parse: function JpxImage_parse(data) {
var head = readUint16(data, 0);