aboutsummaryrefslogtreecommitdiff
path: root/src/library_browser.js
diff options
context:
space:
mode:
authormhenschel <markus.henschel@yager.de>2014-05-13 15:20:19 +0200
committermhenschel <markus.henschel@yager.de>2014-05-13 15:20:19 +0200
commit04d60d0d89cd06b1924e1257b28049cf43733388 (patch)
tree8d2b086330bd99a72dc364448ceea68c6d8f5ba4 /src/library_browser.js
parent5d22fa213f7ec66426e2a838b07a38802714dcef (diff)
fix progress events for non mozilla browsers
Progress events didn't work for me in Chrome or IE. This change fixes it for me.
Diffstat (limited to 'src/library_browser.js')
-rw-r--r--src/library_browser.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index 44e8c473..c164d4b7 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -740,8 +740,8 @@ mergeInto(LibraryManager.library, {
// PROGRESS
http.onprogress = function http_onprogress(e) {
- if (e.lengthComputable || (e.lengthComputable === undefined && e.totalSize != 0)) {
- var percentComplete = (e.position / e.totalSize)*100;
+ if (e.lengthComputable || (e.lengthComputable === undefined && e.total != 0)) {
+ var percentComplete = (e.loaded / e.total)*100;
if (onprogress) Runtime.dynCall('vii', onprogress, [arg, percentComplete]);
}
};