|
@@ -15,7 +15,9 @@ function test1(ex){
|
|
}
|
|
}
|
|
|
|
|
|
window.addEventListener("load", function(){
|
|
window.addEventListener("load", function(){
|
|
- var env = { env: {} };
|
|
|
|
|
|
+ var env = { env: {
|
|
|
|
+ print: (result) => { console.log('result = ', result); }
|
|
|
|
+ } };
|
|
WebAssembly.instantiateStreaming( fetch('add_two.wasm'), env).then( result => {
|
|
WebAssembly.instantiateStreaming( fetch('add_two.wasm'), env).then( result => {
|
|
console.log('WASM loaded!');
|
|
console.log('WASM loaded!');
|
|
var ex = result.instance.exports;
|
|
var ex = result.instance.exports;
|