Commit cca88beb authored by Allison Lamm's avatar Allison Lamm

adding type annotation to field text input

parent 7a5580b3
...@@ -126,6 +126,7 @@ Blockly.FieldTextInput.prototype.showEditor_ = function(opt_quietInput) { ...@@ -126,6 +126,7 @@ Blockly.FieldTextInput.prototype.showEditor_ = function(opt_quietInput) {
// Create the input. // Create the input.
var htmlInput = goog.dom.createDom('input', 'blocklyHtmlInput'); var htmlInput = goog.dom.createDom('input', 'blocklyHtmlInput');
htmlInput.setAttribute('spellcheck', this.spellcheck_); htmlInput.setAttribute('spellcheck', this.spellcheck_);
/** @type {!HTMLInputElement} */
Blockly.FieldTextInput.htmlInput_ = htmlInput; Blockly.FieldTextInput.htmlInput_ = htmlInput;
div.appendChild(htmlInput); div.appendChild(htmlInput);
...@@ -200,7 +201,7 @@ Blockly.FieldTextInput.prototype.onHtmlInputChange_ = function(e) { ...@@ -200,7 +201,7 @@ Blockly.FieldTextInput.prototype.onHtmlInputChange_ = function(e) {
Blockly.FieldTextInput.prototype.validate_ = function() { Blockly.FieldTextInput.prototype.validate_ = function() {
var valid = true; var valid = true;
goog.asserts.assertObject(Blockly.FieldTextInput.htmlInput_); goog.asserts.assertObject(Blockly.FieldTextInput.htmlInput_);
var htmlInput = /** @type {!Element} */ (Blockly.FieldTextInput.htmlInput_); var htmlInput = Blockly.FieldTextInput.htmlInput_;
if (this.sourceBlock_ && this.changeHandler_) { if (this.sourceBlock_ && this.changeHandler_) {
valid = this.changeHandler_(htmlInput.value); valid = this.changeHandler_(htmlInput.value);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment