diff --git a/core/block.js b/core/block.js index 6ca76b4a2..de0c14e86 100644 --- a/core/block.js +++ b/core/block.js @@ -994,7 +994,6 @@ Blockly.Block.prototype.getField = function(name) { /** * Return all variables referenced by this block. * @return {!Array.} List of variable names. - * @package */ Blockly.Block.prototype.getVars = function() { var vars = []; diff --git a/core/flyout_base.js b/core/flyout_base.js index d01652c67..547035ad3 100644 --- a/core/flyout_base.js +++ b/core/flyout_base.js @@ -532,7 +532,7 @@ Blockly.Flyout.prototype.createFlyoutInfo_ = function(parsedContent) { this.permanentlyDisabled_.length = 0; var defaultGap = this.horizontalLayout ? this.GAP_X : this.GAP_Y; for (var i = 0, contentInfo; (contentInfo = parsedContent[i]); i++) { - switch (contentInfo.kind.toUpperCase()) { + switch (contentInfo['kind'].toUpperCase()) { case 'BLOCK': var blockInfo = /** @type {Blockly.utils.toolbox.Block} */ (contentInfo); var blockXml = this.getBlockXml_(blockInfo); diff --git a/core/options.js b/core/options.js index b62e541ee..57e69c5e7 100644 --- a/core/options.js +++ b/core/options.js @@ -168,9 +168,9 @@ Blockly.Options = function(options) { /** * The SVG element for the grid pattern. * Created during injection. - * @type {!SVGElement} + * @type {SVGElement} */ - this.gridPattern = undefined; + this.gridPattern = null; /** * The parent of the current workspace, or null if there is no parent diff --git a/core/registry.js b/core/registry.js index fa533d4cf..08f9dc037 100644 --- a/core/registry.js +++ b/core/registry.js @@ -123,7 +123,7 @@ Blockly.registry.register = function(type, name, registryItem) { Blockly.registry.validate_ = function(type, registryItem) { switch (type) { case String(Blockly.registry.Type.FIELD): - if (typeof registryItem['fromJson'] != 'function') { + if (typeof registryItem.fromJson != 'function') { throw Error('Type "' + type + '" must have a fromJson function'); } break; diff --git a/core/toolbox.js b/core/toolbox.js index d57bfc911..2499fa526 100644 --- a/core/toolbox.js +++ b/core/toolbox.js @@ -275,7 +275,7 @@ Blockly.Toolbox.prototype.createTree_ = function(toolboxDef, treeOut) { } for (var i = 0, childIn; (childIn = toolboxDef[i]); i++) { - switch (childIn.kind.toUpperCase()) { + switch (childIn['kind'].toUpperCase()) { case 'CATEGORY': var categoryInfo = /** @type {Blockly.utils.toolbox.Category} */ (childIn); openNode = this.addCategory_(categoryInfo, treeOut) || openNode; @@ -324,7 +324,7 @@ Blockly.Toolbox.prototype.addCategory_ = function(categoryInfo, treeOut) { // Variables and procedures are special dynamic categories. childOut.contents = custom; } else { - openNode = this.createTree_(categoryInfo.contents, childOut) || openNode; + openNode = this.createTree_(categoryInfo['contents'], childOut) || openNode; } this.setColourOrStyle_(categoryInfo, childOut, categoryName); openNode = this.setExpanded_(categoryInfo, childOut) || openNode; @@ -369,7 +369,7 @@ Blockly.Toolbox.prototype.setColourOrStyle_ = function( */ Blockly.Toolbox.prototype.addSeparator_ = function( separatorInfo, treeOut, lastElement) { - if (lastElement && lastElement.kind.toUpperCase() == 'CATEGORY') { + if (lastElement && lastElement['kind'].toUpperCase() == 'CATEGORY') { // Separator between two categories. // treeOut.add(new Blockly.Toolbox.TreeSeparator( diff --git a/core/workspace_svg.js b/core/workspace_svg.js index e759c3716..d1cfff478 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -102,7 +102,7 @@ Blockly.WorkspaceSvg = function(options, * @private */ this.grid_ = this.options.gridPattern ? - new Blockly.Grid(options.gridPattern, options.gridOptions) : null; + new Blockly.Grid(this.options.gridPattern, options.gridOptions) : null; /** * Manager in charge of markers and cursors. diff --git a/tests/compile/compile.sh b/tests/compile/compile.sh index b3251fc48..232ada8c7 100755 --- a/tests/compile/compile.sh +++ b/tests/compile/compile.sh @@ -75,6 +75,7 @@ done echo "Compiling Blockly..." COMPILATION_COMMAND="java -jar $COMPILER --js='$BLOCKLY_ROOT/tests/compile/main.js' \ --js='$tempPath/**.js' \ + --js='$BLOCKLY_ROOT/tests/blocks/**.js' \ --js='$BLOCKLY_ROOT/blocks/**.js' \ --js='$BLOCKLY_ROOT/generators/**.js' \ --generate_exports \