Created
May 5, 2019 10:55
-
-
Save fvilches17/49c4a33e3cf7d5b8d56a819a6c81ff83 to your computer and use it in GitHub Desktop.
Revisions
-
fvilches17 created this gist
May 5, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ async function handleGreetButtonClickEvent(event) { event.preventDefault(); const { greet } = await import('../src/hello_world/pkg'); greet(); //When greet() is called, .wasm will update the <h1> title in index.html } document.querySelector('#btn-greet').onclick = handleGreetButtonClickEvent;