varaq-wasm-c/public/index.html

31 lines
850 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="navbar"></div>
<div class="row">
<div class="main">
<textarea
rows="20"
id="output"
class="form-control"
style="background-color: black; color: white"
wrap="off"
></textarea>
<canvas id="canvas" height="400" width="800"></canvas>
<script type="module">
WebAssembly.instantiateStreaming(fetch("module.wasm")).then((obj) => {
document.getElementById("output").innerHTML =
obj.instance.exports.main();
});
</script>
</div>
</div>
<div class="footer"></div>
</body>
</html>