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:
parent
cdea0f610e
commit
183d4aa492
1 changed files with 4 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue