Files
blockly/tests/compile/main.js
Christopher Allen beefe361a3 fix!(blocks): Rename Blockly.Blocks.* modules to Blockly.blocks.* (#5696)
Use Blockly.blocks.* for blocks modules, leaving the Blockly.Blocks
name for the block dictionary object.

This resolves a problem with advanced compilation of Blockly Games,
 where, in the compressed output, (the minified name of)
 Blockly.Blocks gets overwritten, with the dictionary object defined in
 core/blocks.js being replaced by an empty namespace object
 created by the provides of Blockly.Blocks.* in blocks/*.js. Without
 this fix, some block definitions end up being created in the
 dictionary and some on the namespace object—with chaos
 predictably ensuing.
2021-11-08 18:35:38 +00:00

31 lines
897 B
JavaScript

/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
goog.provide('Main');
// Core
// Either require 'Blockly.requires', or just the components you use:
goog.require('Blockly');
goog.require('Blockly.geras.Renderer');
goog.require('Blockly.VerticalFlyout');
// Blocks
goog.require('Blockly.Constants.Logic');
goog.require('Blockly.Constants.Loops');
goog.require('Blockly.Constants.Math');
goog.require('Blockly.Constants.TestBlocks');
goog.require('Blockly.Constants.Text');
goog.require('Blockly.Constants.Lists');
goog.require('Blockly.Constants.Colour');
goog.require('Blockly.Constants.Variables');
goog.require('Blockly.Constants.VariablesDynamic');
goog.require('Blockly.blocks.procedures');
Main.init = function() {
Blockly.inject('blocklyDiv', {
'toolbox': document.getElementById('toolbox')
});
};
window.addEventListener('load', Main.init);