forked from holzschu/a-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwasm.html
44 lines (42 loc) · 1.49 KB
/
wasm.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
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<head>
<title>a-Shell, webAssembly execution</title>
<meta charset='utf-8'/>
<meta name="viewport" content="viewport-fit=cover, width=device-width, height=device-height, initial-scale=1, user-scalable=no">
<script src="require.js"></script>
<script src="wasm.js"></script>
<style>
html {
height: 100%;
}
body {
position: fixed;
height: 100%;
width: 100%;
overflow: hidden;
top: 0px;
margin: 0px;
padding: 0px;
}
</style>
</head>
<!-- TODO: check if we can remove everything. contenteditable='false' has stopped the keyboard from adding autocomplete -->
<body autocapitalize='none' contenteditable='false' spellcheck='false' autocomplete='off' autocorrect='off'>
<div id='terminal' autofocus='true' autocapitalize='none' contenteditable='false' spellcheck='false' autocomplete='off' autocorrect='off' ></div>
<script>
// functions to deal with executeJavaScript:
function print(printString) {
window.webkit.messageHandlers.aShell.postMessage('print:' + printString);
}
function println(printString) {
window.webkit.messageHandlers.aShell.postMessage('print:' + printString + '\n');
}
function print_error(printString) {
window.webkit.messageHandlers.aShell.postMessage('print_error:' + printString);
}
console.log = println
console.error = print_error
</script>
</body>
</html>