aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-03-26 17:54:44 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-03-26 17:54:44 -0700
commitca18402ba127f6d41d623170ab566a561d51e376 (patch)
treeb3483fb91ce5a3f32c0b5544c47f2ab2cf421029 /src
parentb0e285503b7e11c3d016cb57744c61562fb9c567 (diff)
show status messages for decompressing and clear status on run
Diffstat (limited to 'src')
-rw-r--r--src/postamble.js4
-rw-r--r--src/shell.html6
2 files changed, 8 insertions, 2 deletions
diff --git a/src/postamble.js b/src/postamble.js
index 62966d61..b14a31a1 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -32,6 +32,10 @@ Module.callMain = function callMain(args) {
function run(args) {
args = args || Module['arguments'];
+ if (Module['setStatus']) {
+ Module['setStatus'](''); // clear the status from "Downloading.." etc.
+ }
+
if (Module['preRun']) {
Module['preRun']();
}
diff --git a/src/shell.html b/src/shell.html
index 9aa73e83..436ba37e 100644
--- a/src/shell.html
+++ b/src/shell.html
@@ -27,11 +27,13 @@
};
})(),
canvas: document.getElementById('canvas'),
+ setStatus: function(text) {
+ document.getElementById('status').innerHTML = text;
+ },
totalDependencies: 0,
monitorRunDependencies: function(left) {
this.totalDependencies = Math.max(this.totalDependencies, left);
- document.getElementById('status').innerHTML = left ? 'Downloading files: ' + (this.totalDependencies-left) + '/' + this.totalDependencies :
- 'All downloads complete.';
+ Module.setStatus(left ? 'Downloading: ' + (this.totalDependencies-left) + '/' + this.totalDependencies : 'All downloads complete.');
}
};