Inform user if gh-pages wasm demo cannot be instantiated
This commit is contained in:
parent
56d47aeb8f
commit
941f3ea520
1 changed files with 5 additions and 1 deletions
|
@ -83,7 +83,11 @@ convert="
|
||||||
const go = new Go();
|
const go = new Go();
|
||||||
WebAssembly
|
WebAssembly
|
||||||
.instantiateStreaming(fetch('main.wasm'), go.importObject)
|
.instantiateStreaming(fetch('main.wasm'), go.importObject)
|
||||||
.then((result) => go.run(result.instance));
|
.then((result) => go.run(result.instance),
|
||||||
|
(error) => {
|
||||||
|
const button = document.getElementById('run');
|
||||||
|
button.textContent = 'ERROR: (' + error + ')';
|
||||||
|
});
|
||||||
|
|
||||||
function initialized() {
|
function initialized() {
|
||||||
const button = document.getElementById('run');
|
const button = document.getElementById('run');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue