Remove goog.dom.removeNode

This commit is contained in:
Neil Fraser
2018-06-29 15:58:41 -07:00
committed by Neil Fraser
parent f802859547
commit c51cf0b79c
19 changed files with 36 additions and 42 deletions

View File

@@ -29,7 +29,6 @@ goog.provide('Blockly.ScrollbarPair');
goog.require('Blockly.utils');
goog.require('goog.dom');
goog.require('goog.events.BrowserFeature');
goog.require('goog.math.Coordinate');
@@ -73,7 +72,7 @@ Blockly.ScrollbarPair.prototype.oldHostMetrics_ = null;
* Unlink from all DOM elements to prevent memory leaks.
*/
Blockly.ScrollbarPair.prototype.dispose = function() {
goog.dom.removeNode(this.corner_);
this.corner_.parentNode.removeChild(this.corner_);
this.corner_ = null;
this.workspace_ = null;
this.oldHostMetrics_ = null;
@@ -348,7 +347,7 @@ Blockly.Scrollbar.prototype.dispose = function() {
Blockly.unbindEvent_(this.onMouseDownHandleWrapper_);
this.onMouseDownHandleWrapper_ = null;
goog.dom.removeNode(this.outerSvg_);
this.outerSvg_.parentNode.removeChild(this.outerSvg_);
this.outerSvg_ = null;
this.svgGroup_ = null;
this.svgBackground_ = null;