The withEachDescendant() method passes each descendant module of the current module to the specified callback function.
status = withEachDescendant( callback )
|
callback |
Function |
Function that acts on descendant module passed as an argument. |
|
Boolean |
Status indication: True = Descendant modules successfully traversed. False = The callback function returned False for one of the descendants; operation terminated. |
someChildrenRequireDispatch: function(search) {
var requireDispatch = false;
this.withEachChild(function(child) {
if (child.requiresDispatch(search)) {
requireDispatch = true;
return false;
}
});
return requireDispatch;
},