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.
optimising-macrocalls
jeremy@jermolene.com 2020-11-26 12:41:24 +00:00
rodzic 8320a55fef
commit 9637a29e55
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -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");
};
})();

Wyświetl plik

@ -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();

Wyświetl plik

@ -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);
});
};