- Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
49 lines (49 loc) · 1.34 KB
/
index.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
45
46
47
48
49
<html>
<head>
<title>ISLisp on WebAssembly</title>
<scriptsrc="wasm_exec.js"></script>
<scripttype="text/javascript">
functionfetchAndInstantiate(url,importObject){
returnfetch(url).then(response=>
response.arrayBuffer()
).then(bytes=>
WebAssembly.instantiate(bytes,importObject)
).then(results=>
results.instance
);
}
vargo=newGo();
varmod=fetchAndInstantiate("./iris.wasm",go.importObject);
window.onload=function(){
mod.then(function(instance){
go.run(instance);
});
};
</script>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
footer {
padding-top:20px;
}
</style>
</head>
<body>
<h1>ISLisp on WebAssembly</h1>
<div>
<textareaid="input" placeholder="input"></textarea>
<buttonid="button">Eval</button>
<textareaid="output" placeholder="output"></textarea>
</div>
<br>
<ahref="https://github.com/asciian/iris">Main Repository (asciian/iris)</a><br>
<ahref="https://github.com/asciian/islisp.js.org">JS/WASM Repository (asciian/islisp.js.org) </a>
<footer>
Copyright © 2018 TANIGUCHI Masaya All Rights Reserved.
</footer>
</body>
</html>