mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-14 18:43:27 +01:00
add hello world sample
This commit is contained in:
parent
d63ecdc716
commit
ff6de221f8
13
docs/samples/HelloWorld/HelloWorld.html
Normal file
13
docs/samples/HelloWorld/HelloWorld.html
Normal file
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="HelloWorld.wasm.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
WebAssembly.instantiateStreaming(fetch('HelloWorld.wasm'), wasmImports)
|
||||
.then(obj => obj.instance.exports.main())
|
||||
.catch((err) => document.write(err + '<p>Missing <a href="https://github.com/i-net-software/JWebAssembly/wiki/browser">Browser Support</a>') );
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user