forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.html
39 lines (37 loc) · 1.23 KB
/
shell.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html>
<head>
<title>Emscripten-Generated Code</title>
<body>
<center>
<canvas id='canvas' width='256' height='256'></canvas>
</center>
<hr>
<div id='output'></div>
<hr>
<center><div id='status'></div></center>
<hr>
<script type='text/javascript'>
// connect to canvas
var Module = {
print: (function() {
var element = document.getElementById('output');
return function(text) {
text = text.replace(/&/g, "&");
text = text.replace(/</g, "<");
text = text.replace(/>/g, ">");
text = text.replace('\n', '<br>', 'g');
element.innerHTML += text + '<br>';
};
})(),
canvas: document.getElementById('canvas'),
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.';
}
};
{{{ SCRIPT_CODE }}}
</script>
</body>
</html>