From de776f56293d06eb6bfdadcbeed40178927fd0e2 Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Thu, 26 May 2022 18:26:26 +0100 Subject: [PATCH] fix(tests): Don't use template literals in bootstrap.js This is necessary (but not necessarily sufficient) to be able to load the file in IE 11. --- tests/bootstrap.js | 56 ++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/tests/bootstrap.js b/tests/bootstrap.js index 32c451598..797a449d9 100644 --- a/tests/bootstrap.js +++ b/tests/bootstrap.js @@ -55,7 +55,10 @@ } if (!options.loadCompiled) { - // We can load Blockly in uncompiled mode. + // We can load Blockly in uncompiled mode. Note that this section + // needs to parse in IE11 (mostly ES5.1, but allowing e.g. const), + // but it does not need to be _executable_ in IE11 - it is safe to + // use ES6 builtins. // Disable loading of closure/goog/deps.js (which doesn't exist). window.CLOSURE_NO_DEPS = true; @@ -77,32 +80,31 @@ window.Blockly = {Msg: Object.create(null)}; document.write( ''); - document.write(` - `); - - document.write(` - `); + document.write( + '\n'); + document.write( + '\n'); } else { // The below code is necessary for a few reasons: // - We need an absolute path instead of relative path because the