Files
blockly/tests
Christopher Allen ac2d689618 fix(tests): Rewrite bootstrap sequencing code
An earlier commit modified the generated <script> to use
goog.addDependency to trick the debug module loader into loading
.additionalScripts (via goog.bootstrap), but it turns out there is
a small problem: scripts like msg/messages.js have undeclared
dependencies on the Blockly module, and without a call to
goog.require('Blockly') in them they can end up being run before
the Blockly module is fully loaded.

(This problem only occurs when there are ES Modules, rather than
merely goog.modules, in the mix.)

Fix this by adding a script, bootstrap_helper.js, to be loaded
options.requires and any options.additionalScripts that makes an
explicit call to goog.require for each of option.requires.

Also refactor the code so that instead of generating a loop which
calls goog.addDependency, we generate the addDependency calls
directly.  This makes debugging a bit easer as we can use the browser's
dev tools to inspect the generated calls in the DOM tree.
2022-06-14 23:35:47 +01:00
..
2019-07-30 15:08:47 -07:00