mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-05 05:06:40 +00:00
Refactor rendertree to simplify context handling
Get rid of the separate renderContext stack and instead have a parent pointer on renderer nodes. This lets us walk back up the render tree to resolve context references
This commit is contained in:
@@ -36,8 +36,8 @@ Notifier.prototype.display = function(title,options) {
|
||||
$tw.utils.addClass(notification,"tw-notification");
|
||||
// Render the body of the notification
|
||||
var bodyParser = this.wiki.parseTiddler(title),
|
||||
bodyRenderTree = new $tw.WikiRenderTree(bodyParser,{wiki: $tw.wiki});
|
||||
bodyRenderTree.execute({tiddlerTitle: title});
|
||||
bodyRenderTree = new $tw.WikiRenderTree(bodyParser,{wiki: $tw.wiki, context: {tiddlerTitle: title}});
|
||||
bodyRenderTree.execute();
|
||||
bodyRenderTree.renderInDom(notification);
|
||||
this.wiki.addEventListener("change",function(changes) {
|
||||
bodyRenderTree.refreshInDom(changes);
|
||||
|
||||
Reference in New Issue
Block a user