Merge pull request #1840 from yurydelendik/loadpdf-1

Moves loading of the binary PDF data to the worker
This commit is contained in:
Brendan Dahl 2012-07-23 16:27:55 -07:00
commit b3a603c199
9 changed files with 141 additions and 62 deletions

View file

@ -45,8 +45,8 @@ function getPdf(arg, callback) {
}
xhr.mozResponseType = xhr.responseType = 'arraybuffer';
var protocol = params.url.indexOf(':') < 0 ? window.location.protocol :
params.url.substring(0, params.url.indexOf(':') + 1);
var protocol = params.url.substring(0, params.url.indexOf(':') + 1);
xhr.expected = (protocol === 'http:' || protocol === 'https:') ? 200 : 0;
if ('progress' in params)