Remove all goog.asserts and goog.isXxx

First step to reducing Closure’s footprint.
This commit is contained in:
Neil Fraser
2018-06-10 00:15:22 -07:00
committed by Neil Fraser
parent 02dc7b1d1d
commit 3909bd420a
35 changed files with 251 additions and 205 deletions

View File

@@ -28,7 +28,6 @@ goog.provide('Blockly.FieldTextInput');
goog.require('Blockly.Field');
goog.require('Blockly.Msg');
goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.userAgent');
@@ -300,7 +299,9 @@ Blockly.FieldTextInput.prototype.onHtmlInputChange_ = function(_e) {
*/
Blockly.FieldTextInput.prototype.validate_ = function() {
var valid = true;
goog.asserts.assertObject(Blockly.FieldTextInput.htmlInput_);
if (!Blockly.FieldTextInput.htmlInput_) {
throw TypeError('htmlInput not defined');
}
var htmlInput = Blockly.FieldTextInput.htmlInput_;
if (this.sourceBlock_) {
valid = this.callValidator(htmlInput.value);