mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Fetches pdf data in the worker
This commit is contained in:
parent
e2b0c76585
commit
00f1d6dbf1
6 changed files with 137 additions and 52 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