1
0
Fork 0
mirror of https://github.com/Luzifer/wasm-openssl.git synced 2024-11-08 14:50:10 +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>