1
0
mirror of https://github.com/Luzifer/wasm-openssl.git synced 2024-09-18 23:42:57 +00:00

Improve example formatting

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-09-18 19:11:05 +02:00
parent cdea0f610e
commit 183d4aa492
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E

View File

@ -31,7 +31,10 @@ Afterwards in your HTML you can include the `wasm_exec.js` and load the binary:
function opensslLoaded() { console.log("openssl.wasm loaded") }
const go = new Go()
WebAssembly.instantiateStreaming(fetch("openssl.wasm"), go.importObject).then(async obj => await go.run(obj.instance))
WebAssembly.instantiateStreaming(fetch("openssl.wasm"), go.importObject)
.then(async (obj) => {
await go.run(obj.instance)
})
</script>
</body>
</html>