mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +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
|
@ -86,6 +86,10 @@ function exceptionToString(e) {
|
|||
return e.message + ('stack' in e ? ' at ' + e.stack.split('\n')[0] : '');
|
||||
}
|
||||
|
||||
function expandUrl(url) {
|
||||
return combineUrl(window.location.href, url);
|
||||
}
|
||||
|
||||
function nextTask() {
|
||||
cleanup();
|
||||
|
||||
|
@ -98,7 +102,7 @@ function nextTask() {
|
|||
|
||||
log('Loading file "' + task.file + '"\n');
|
||||
|
||||
getPdf(task.file, function nextTaskGetPdf(data) {
|
||||
getPdf(expandUrl(task.file), function nextTaskGetPdf(data) {
|
||||
var failure;
|
||||
function continuation() {
|
||||
task.pageNum = task.firstPage || 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue