mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Adds support of the indeterminate loading progress
This commit is contained in:
parent
da861bef30
commit
cd1a645881
4 changed files with 40 additions and 7 deletions
|
@ -135,12 +135,10 @@ var WorkerMessageHandler = {
|
|||
{
|
||||
url: source.url,
|
||||
progress: function getPDFProgress(evt) {
|
||||
if (evt.lengthComputable) {
|
||||
handler.send('DocProgress', {
|
||||
loaded: evt.loaded,
|
||||
total: evt.total
|
||||
});
|
||||
}
|
||||
handler.send('DocProgress', {
|
||||
loaded: evt.loaded,
|
||||
total: evt.lengthComputable ? evt.total : void(0)
|
||||
});
|
||||
},
|
||||
error: function getPDFError(e) {
|
||||
handler.send('DocError', 'Unexpected server response of ' +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue