Last active
October 26, 2020 00:07
-
-
Save Israel-Miles/df7a82c035d759a6a6ff0d6906f0572c to your computer and use it in GitHub Desktop.
webassembly index page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>WebAssembly with Go</title> | |
<body> | |
<h1>You've compiled Go for WebAssembly, Congratulations!</h1> | |
<script src="wasm_exec.js"></script> | |
<script> | |
const go = new Go(); | |
WebAssembly.instantiateStreaming( | |
fetch("main.wasm"), | |
go.importObject).then((result) => { | |
go.run(result.instance); | |
} | |
); | |
</script> | |
</body> | |
</head> | |
<body></body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment