From 941f3ea52090fe1c8b88638eeaf814d82b5a16ec Mon Sep 17 00:00:00 2001 From: Niklas Fasching Date: Tue, 18 Dec 2018 18:26:17 +0100 Subject: [PATCH] Inform user if gh-pages wasm demo cannot be instantiated --- etc/generate-gh-pages | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etc/generate-gh-pages b/etc/generate-gh-pages index 34a587e..85fd91a 100755 --- a/etc/generate-gh-pages +++ b/etc/generate-gh-pages @@ -83,7 +83,11 @@ convert=" const go = new Go(); WebAssembly .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() { const button = document.getElementById('run');