1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-03 07:18:06 +00:00

Move construction of rootwidget into main startup

This commit is contained in:
Jermolene
2014-08-13 20:06:44 +01:00
parent 34461cb2fe
commit d16bff7787
2 changed files with 8 additions and 8 deletions

View File

@@ -50,6 +50,14 @@ exports.startup = function() {
});
// Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup
$tw.wiki.clearTiddlerEventQueue();
// Create a root widget for attaching event handlers. By using it as the parentWidget for another widget tree, one can reuse the event handlers
$tw.rootWidget = new widget.widget({
type: "widget",
children: []
},{
wiki: $tw.wiki,
document: document
});
// Set up the syncer object
$tw.syncer = new $tw.Syncer({wiki: $tw.wiki});
// Host-specific startup