mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Reducing function calls across board (#4102)
This commit is contained in:
parent
cb77f3f503
commit
b67e088e55
@ -385,9 +385,10 @@ Widget.prototype.previousSibling = function() {
|
||||
Render the children of this widget into the DOM
|
||||
*/
|
||||
Widget.prototype.renderChildren = function(parent,nextSibling) {
|
||||
$tw.utils.each(this.children,function(childWidget) {
|
||||
childWidget.render(parent,nextSibling);
|
||||
});
|
||||
var children = this.children;
|
||||
for(var i = 0; i < children.length; i++) {
|
||||
children[i].render(parent,nextSibling);
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
@ -455,11 +456,11 @@ Widget.prototype.refreshSelf = function() {
|
||||
Refresh all the children of a widget
|
||||
*/
|
||||
Widget.prototype.refreshChildren = function(changedTiddlers) {
|
||||
var self = this,
|
||||
var children = this.children,
|
||||
refreshed = false;
|
||||
$tw.utils.each(this.children,function(childWidget) {
|
||||
refreshed = childWidget.refresh(changedTiddlers) || refreshed;
|
||||
});
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
refreshed = children[i].refresh(changedTiddlers) || refreshed;
|
||||
}
|
||||
return refreshed;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user