mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-25 06:14:58 +00:00
Initial commit
This commit is contained in:
11
boot/boot.js
11
boot/boot.js
@@ -965,11 +965,12 @@ Apply a callback to each module of a particular type
|
|||||||
moduleType: type of modules to enumerate
|
moduleType: type of modules to enumerate
|
||||||
callback: function called as callback(title,moduleExports) for each module
|
callback: function called as callback(title,moduleExports) for each module
|
||||||
*/
|
*/
|
||||||
$tw.modules.forEachModuleOfType = function(moduleType,callback) {
|
$tw.modules.forEachModuleOfType = function(moduleType,callback) {
|
||||||
var modules = $tw.modules.types[moduleType];
|
$tw.utils.each($tw.modules.titles,function(moduleInfo,title) {
|
||||||
$tw.utils.each(modules,function(element,title) {
|
if(moduleInfo.moduleType === moduleType) {
|
||||||
callback(title,$tw.modules.execute(title));
|
callback(title,$tw.modules.execute(title));
|
||||||
});
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user