1
0
Fork 0
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:
Yury Delendik 2012-08-22 10:48:56 -05:00
parent da861bef30
commit cd1a645881
4 changed files with 40 additions and 7 deletions

View file

@ -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 ' +