mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-10 07:43:49 +00:00
make tv-widget-ancestors variable available for every widget. This one may help us in the future
This commit is contained in:
parent
eee246091d
commit
bd94695f3e
@ -479,6 +479,8 @@ Widget.prototype.getAncestorCount = function() {
|
||||
if(this.ancestorCount === undefined) {
|
||||
if(this.parentWidget) {
|
||||
this.ancestorCount = this.parentWidget.getAncestorCount() + 1;
|
||||
// Allow users to debug the info. Should help with recursion / nesting problems
|
||||
this.setVariable("tv-widget-ancestors", this.ancestorCount + "");
|
||||
} else {
|
||||
this.ancestorCount = 0;
|
||||
this.setVariable("tv-UNSAFE-max-widget-tree-depth", MAX_WIDGET_TREE_DEPTH + "");
|
||||
|
Loading…
x
Reference in New Issue
Block a user