mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Merge pull request #1840 from yurydelendik/loadpdf-1
Moves loading of the binary PDF data to the worker
This commit is contained in:
commit
b3a603c199
9 changed files with 141 additions and 62 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue