1
0
mirror of https://github.com/taigrr/wasm-experiments synced 2025-01-18 04:03:21 -08:00

Update html folder for new wasm-go structure

This commit is contained in:
Johan Brandhorst
2018-05-12 15:07:14 +01:00
parent e16f079d16
commit 0bc494b8b2
3 changed files with 313 additions and 336 deletions

View File

@@ -1,4 +1,9 @@
<!doctype html>
<!--
Copyright 2018 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
<head>
@@ -12,13 +17,14 @@
async function loadAndCompile() {
let resp = await fetch("test.wasm");
let bytes = await resp.arrayBuffer();
await compile(bytes);
await go.compile(bytes);
document.getElementById("runButton").disabled = false;
}
loadAndCompile();
</script>
<button onClick="console.clear(); run();" id="runButton" disabled>Run</button>
<button onClick="console.clear(); go.run();" id="runButton" disabled>Run</button>
</body>
</html>