1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-16 07:17:21 +00:00

Remove implementation of $:/globals/

Performance with this implementation is inherently poor because of the need to perform a wiki lookup for each child widget created.
This commit is contained in:
jeremy@jermolene.com
2022-09-24 12:56:06 +01:00
parent 1aba8a1f65
commit e3d13696c8
23 changed files with 13 additions and 304 deletions

View File

@@ -155,20 +155,6 @@ Widget.prototype.getVariableInfo = function(name,options) {
}
// If the variable doesn't exist in the parent widget then look for a macro module
var text = this.evaluateMacroModule(name,actualParams);
if(text === undefined) {
// Check for a shadow variable tiddler
var tiddler = this.wiki.getTiddler("$:/global/" + name);
if(tiddler) {
return processVariable({
value: tiddler.getFieldString("text"),
params: $tw.utils.parseParameterDefinition(tiddler.getFieldString("_parameters"),{requireParenthesis: true}),
isMacroDefinition: tiddler.getFieldString("_is_macro") === "yes",
isWidgetDefinition: tiddler.getFieldString("_is_widget") === "yes",
isProcedureDefinition: tiddler.getFieldString("_is_procedure") === "yes",
isFunctionDefinition: tiddler.getFieldString("_is_function") === "yes"
});
}
}
if(text === undefined) {
text = options.defaultValue;
}