diff options
author | mhenschel <markus.henschel@yager.de> | 2014-05-13 15:20:19 +0200 |
---|---|---|
committer | mhenschel <markus.henschel@yager.de> | 2014-05-13 15:20:19 +0200 |
commit | 04d60d0d89cd06b1924e1257b28049cf43733388 (patch) | |
tree | 8d2b086330bd99a72dc364448ceea68c6d8f5ba4 /src/library_browser.js | |
parent | 5d22fa213f7ec66426e2a838b07a38802714dcef (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.js | 4 |
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]); } }; |