mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-15 22:31:24 +00:00
Improve the Widget.prototype.removeChildDomNodes() method so that most subclasses won't need to override it
This commit is contained in:
@@ -170,16 +170,6 @@ ViewWidget.prototype.refresh = function(changedTiddlers) {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Remove any DOM nodes created by this widget
|
||||
*/
|
||||
ViewWidget.prototype.removeChildDomNodes = function() {
|
||||
$tw.utils.each(this.domNodes,function(domNode) {
|
||||
domNode.parentNode.removeChild(domNode);
|
||||
});
|
||||
this.domNodes = [];
|
||||
};
|
||||
|
||||
exports.view = ViewWidget;
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user