-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
32 lines (28 loc) · 867 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<title>Befunge93</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div id="app"></div>
<script src="../node_modules/react/umd/react.development.js"></script>
<script src="../node_modules/react-dom/umd/react-dom.development.js"></script>
<script type="module">
import init from '../pkg/befunge_interpreter.js';
const setup = async () => await init();
setup().then(() => {
document.querySelector("#run").addEventListener("click",function() {
import('../pkg/befunge_interpreter.js').then(module =>
module.read(
document.querySelector("#input").value,
document.querySelector("#code").value
)
);
});
});
</script>
<script src="./bundle.js"></script>
</body>
</html>