summaryrefslogtreecommitdiff
path: root/html/index.html
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2024-04-21 22:46:25 +0100
committerdavidovski <david@davidovski.xyz>2024-04-21 22:46:25 +0100
commit39b86eddf0404d9fd39a32724e47fd54629189a5 (patch)
treeefda9cea5f44231aab18b346193c2f78a4283e30 /html/index.html
parentbc09e485e6981e5b4943161b5a9d410ac179eb4a (diff)
do not let items place ontop of each other
Diffstat (limited to 'html/index.html')
-rw-r--r--html/index.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/html/index.html b/html/index.html
new file mode 100644
index 0000000..9e9ac4c
--- /dev/null
+++ b/html/index.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<script src="wasm_exec.js"></script>
+<script>
+// Polyfill
+if (!WebAssembly.instantiateStreaming) {
+ WebAssembly.instantiateStreaming = async (resp, importObject) => {
+ const source = await (await resp).arrayBuffer();
+ return await WebAssembly.instantiate(source, importObject);
+ };
+}
+
+const go = new Go();
+WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then(result => {
+ go.run(result.instance);
+});
+</script>