mirror of
https://github.com/google/blockly.git
synced 2026-01-11 19:07:08 +01:00
Use .textContent setter for field text
This commit is contained in:
@@ -360,10 +360,7 @@ Blockly.Field.prototype.render_ = function() {
|
||||
}
|
||||
|
||||
// Replace the text.
|
||||
goog.dom.removeChildren(/** @type {!Element} */ (this.textElement_));
|
||||
var textNode = document.createTextNode(this.getDisplayText_());
|
||||
this.textElement_.appendChild(textNode);
|
||||
|
||||
this.textElement_.textContent = this.getDisplayText_();
|
||||
this.updateWidth();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user