From c0cff536ab1cc34f0643770bee8e2a88373269d7 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Mon, 15 Oct 2018 01:27:55 +0900 Subject: [PATCH] wasm: Enable backtraces in browser console --- index.html | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 00444fc..1f4d864 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ padding: none; } .emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; } - div.emscripten { text-align: center; } + div.emscripten { text-align: center; } div.emscripten_border { border: 1px solid black; } canvas.emscripten { width: 600px; height: 600px; } /* the canvas *must not* have any border or padding, or mouse coords will be wrong */ @@ -36,7 +36,7 @@ border-right: 5px solid rgb(235, 235, 235); border-bottom: 5px solid rgb(235, 235, 235); border-top: 5px solid rgb(120, 120, 120); - + border-radius: 100%; background-color: rgb(189, 215, 46); } @@ -95,7 +95,7 @@ Resize canvas Lock/hide mouse pointer     - @@ -104,7 +104,6 @@ -
@@ -115,18 +114,13 @@ var progressElement = document.getElementById('progress'); var spinnerElement = document.getElementById('spinner'); var Module = { - preRun: [], + preRun: [ function() { ENV.RUST_BACKTRACE = '1' } ], postRun: [], print: (function() { var element = document.getElementById('output'); if (element) element.value = ''; // clear browser cache return function(text) { if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' '); - // These replacements are necessary if you render to raw HTML - //text = text.replace(/&/g, "&"); - //text = text.replace(//g, ">"); - //text = text.replace('\n', '
', 'g'); console.log(text); if (element) { element.value += text + "\n"; -- 2.25.1