diff --git a/js-api-examples/global.html b/js-api-examples/global.html
index 1cbaf2f..5d7fcf0 100644
--- a/js-api-examples/global.html
+++ b/js-api-examples/global.html
@@ -1,9 +1,10 @@
-
+
-
+
+
WebAssembly Globals example
@@ -12,11 +13,11 @@
const output = document.getElementById("output");
function assertEq(msg, got, expected) {
- output.innerHTML += `Testing ${msg}: `;
+ output.innerText += `Testing ${msg}: `;
if (got !== expected) {
- output.innerHTML += `FAIL!
Got: ${got}
Expected: ${expected}
`;
+ output.innerText += `FAIL!\nGot: ${got}\nExpected: ${expected}\n`;
} else {
- output.innerHTML += `SUCCESS! Got: ${got}
`;
+ output.innerText += `SUCCESS! Got: ${got}\n`;
}
}