diff --git a/core/field_textinput.js b/core/field_textinput.js index 5398b9b3a..e1647ed1f 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -30,7 +30,6 @@ goog.require('Blockly.Field'); goog.require('Blockly.Msg'); goog.require('Blockly.utils'); -goog.require('goog.dom'); goog.require('goog.math.Coordinate'); goog.require('goog.userAgent'); @@ -193,7 +192,8 @@ Blockly.FieldTextInput.prototype.showInlineEditor_ = function(quietInput) { Blockly.WidgetDiv.show(this, this.sourceBlock_.RTL, this.widgetDispose_()); var div = Blockly.WidgetDiv.DIV; // Create the input. - var htmlInput = goog.dom.createDom('input', 'blocklyHtmlInput'); + var htmlInput = document.createElement('input'); + htmlInput.className = 'blocklyHtmlInput'; htmlInput.setAttribute('spellcheck', this.spellcheck_); var fontSize = (Blockly.FieldTextInput.FONTSIZE * this.workspace_.scale) + 'pt'; @@ -301,7 +301,7 @@ Blockly.FieldTextInput.prototype.onHtmlInputChange_ = function(_e) { Blockly.FieldTextInput.prototype.validate_ = function() { var valid = true; if (!Blockly.FieldTextInput.htmlInput_) { - throw TypeError('htmlInput not defined'); + throw Error('htmlInput not defined'); } var htmlInput = Blockly.FieldTextInput.htmlInput_; if (this.sourceBlock_) { diff --git a/core/inject.js b/core/inject.js index f88434762..46289275e 100644 --- a/core/inject.js +++ b/core/inject.js @@ -58,7 +58,8 @@ Blockly.inject = function(container, opt_options) { throw Error('Error: container is not in current document.'); } var options = new Blockly.Options(opt_options || {}); - var subContainer = goog.dom.createDom('div', 'injectionDiv'); + var subContainer = document.createElement('div'); + subContainer.className = 'injectionDiv'; container.appendChild(subContainer); var svg = Blockly.createDom_(subContainer, options); diff --git a/core/toolbox.js b/core/toolbox.js index 9a9aeffee..6546d4a06 100644 --- a/core/toolbox.js +++ b/core/toolbox.js @@ -156,7 +156,8 @@ Blockly.Toolbox.prototype.init = function() { * HTML container for the Toolbox menu. * @type {Element} */ - this.HtmlDiv = goog.dom.createDom('div', 'blocklyToolboxDiv'); + this.HtmlDiv = document.createElement('div'); + this.HtmlDiv.className = 'blocklyToolboxDiv'; this.HtmlDiv.setAttribute('dir', workspace.RTL ? 'RTL' : 'LTR'); svg.parentNode.insertBefore(this.HtmlDiv, svg);