mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 18:00:26 +00:00
Rename widget.executeStartupTiddlers() to invokeActionsByTag()
This method was introduced earlier in v5.1.23 in 5cc1600072
It is not in fact restricted to startup tiddlers.
This commit is contained in:
parent
8320a55fef
commit
9637a29e55
@ -107,7 +107,7 @@ exports.startup = function() {
|
||||
$tw.rootWidget.domNodes = [$tw.pageContainer];
|
||||
$tw.rootWidget.children = [$tw.pageWidgetNode];
|
||||
// Run any post-render startup actions
|
||||
$tw.rootWidget.executeStartupTiddlers("$:/tags/StartupAction/PostRender");
|
||||
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/PostRender");
|
||||
};
|
||||
|
||||
})();
|
||||
|
@ -64,12 +64,12 @@ exports.startup = function() {
|
||||
document: $tw.browser ? document : $tw.fakeDocument
|
||||
});
|
||||
// Execute any startup actions
|
||||
$tw.rootWidget.executeStartupTiddlers("$:/tags/StartupAction");
|
||||
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction");
|
||||
if($tw.browser) {
|
||||
$tw.rootWidget.executeStartupTiddlers("$:/tags/StartupAction/Browser");
|
||||
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Browser");
|
||||
}
|
||||
if($tw.node) {
|
||||
$tw.rootWidget.executeStartupTiddlers("$:/tags/StartupAction/Node");
|
||||
$tw.rootWidget.invokeActionsByTag("$:/tags/StartupAction/Node");
|
||||
}
|
||||
// Kick off the language manager and switcher
|
||||
$tw.language = new $tw.Language();
|
||||
|
@ -574,10 +574,10 @@ Widget.prototype.invokeActionString = function(actions,triggeringWidget,event,va
|
||||
/*
|
||||
Execute action tiddlers by tag
|
||||
*/
|
||||
Widget.prototype.executeStartupTiddlers = function(tag) {
|
||||
Widget.prototype.invokeActionsByTag = function(tag,event,variables) {
|
||||
var self = this;
|
||||
$tw.utils.each(self.wiki.filterTiddlers("[all[shadows+tiddlers]tag[" + tag + "]!has[draft.of]]"),function(title) {
|
||||
self.invokeActionString(self.wiki.getTiddlerText(title),self);
|
||||
self.invokeActionString(self.wiki.getTiddlerText(title),self,event,variables);
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user