mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-24 22:33:16 +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
|
Render the children of this widget into the DOM
|
||||||
*/
|
*/
|
||||||
Widget.prototype.renderChildren = function(parent,nextSibling) {
|
Widget.prototype.renderChildren = function(parent,nextSibling) {
|
||||||
$tw.utils.each(this.children,function(childWidget) {
|
var children = this.children;
|
||||||
childWidget.render(parent,nextSibling);
|
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
|
Refresh all the children of a widget
|
||||||
*/
|
*/
|
||||||
Widget.prototype.refreshChildren = function(changedTiddlers) {
|
Widget.prototype.refreshChildren = function(changedTiddlers) {
|
||||||
var self = this,
|
var children = this.children,
|
||||||
refreshed = false;
|
refreshed = false;
|
||||||
$tw.utils.each(this.children,function(childWidget) {
|
for (var i = 0; i < children.length; i++) {
|
||||||
refreshed = childWidget.refresh(changedTiddlers) || refreshed;
|
refreshed = children[i].refresh(changedTiddlers) || refreshed;
|
||||||
});
|
}
|
||||||
return refreshed;
|
return refreshed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user