1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-05 00:08:06 +00:00

Refactor widget implementation

This commit is contained in:
Jeremy Ruston
2012-12-14 16:01:37 +00:00
parent 0055947913
commit 3e06bca347
8 changed files with 67 additions and 66 deletions

View File

@@ -39,7 +39,8 @@ var WidgetRenderer = function(renderTree,renderContext,parseTreeNode) {
// Create the widget object
var WidgetClass = this.renderTree.parser.vocabulary.widgetClasses[this.parseTreeNode.tag];
if(WidgetClass) {
this.widget = new WidgetClass(this);
this.widget = new WidgetClass();
this.widget.init(this);
} else {
// Error if we couldn't find the widget
this.children = this.renderTree.createRenderers(this.renderContext,[