aboutsummaryrefslogtreecommitdiff
path: root/src/library_browser.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-05-13 10:48:04 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-05-13 10:48:04 -0700
commitbcc312a226fd9b719dc00d569afabc62adc2f712 (patch)
tree0922b02f2650d4aeb816b6d0437b7a9fb170fd23 /src/library_browser.js
parent87d810fc5e78473fc73eb09258c41f40830b7602 (diff)
parente0a636a2963266bb80469f90103362fc79eb1727 (diff)
Merge pull request #2353 from mhenschel/master
emscripten_async_wget2 progress callback only working on mozilla browsers
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 fce7bdd5..07d33b32 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -765,8 +765,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]);
}
};