aboutsummaryrefslogtreecommitdiff
path: root/src/library_browser.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-20 09:52:41 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-20 09:52:41 -0800
commit8051633205895a98d9c952fa730f2ebbba709c3b (patch)
treef10b3a331fb5c8b1b652f08c974abc187da43342 /src/library_browser.js
parent2b0cdb2d135dd6f3f13456a0a9fc07bf87319201 (diff)
update async_wget2 to dynCall
Diffstat (limited to 'src/library_browser.js')
-rw-r--r--src/library_browser.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index 8aa9872a..0bc6d130 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -411,21 +411,21 @@ mergeInto(LibraryManager.library, {
http.onload = function(e) {
if (http.status == 200) {
FS.createDataFile( _file.substr(0, index), _file.substr(index + 1), new Uint8Array(http.response), true, true);
- if (onload) FUNCTION_TABLE[onload](arg, file);
+ if (onload) Runtime.dynCall('vii', onload, [arg, file]);
} else {
- if (onerror) FUNCTION_TABLE[onerror](arg, http.status);
+ if (onerror) Runtime.dynCall('vii', onerror, [arg, http.status]);
}
};
// ERROR
http.onerror = function(e) {
- if (onerror) FUNCTION_TABLE[onerror](arg, http.status);
+ if (onerror) Runtime.dynCall('vii', onerror, [arg, http.status]);
};
// PROGRESS
http.onprogress = function(e) {
var percentComplete = (e.position / e.totalSize)*100;
- if (onprogress) FUNCTION_TABLE[onprogress](arg, percentComplete);
+ if (onprogress) Runtime.dynCall('vii', onprogress, [arg, percentComplete]);
};
// Useful because the browser can limit the number of redirection