mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-03-25 04:46:55 +00:00
Fix rootwidget handling
This commit is contained in:
parent
7c1cb97f7f
commit
449edf99b5
@ -15,7 +15,7 @@ Password handling
|
||||
// Export name and synchronous status
|
||||
exports.name = "password";
|
||||
exports.platforms = ["browser"];
|
||||
exports.after = ["rootwidget"];
|
||||
exports.after = ["startup"];
|
||||
exports.synchronous = true;
|
||||
|
||||
exports.startup = function() {
|
||||
|
@ -15,12 +15,10 @@ Setup the root widget and the core root widget handlers
|
||||
// Export name and synchronous status
|
||||
exports.name = "rootwidget";
|
||||
exports.platforms = ["browser"];
|
||||
exports.after = ["load-modules"];
|
||||
exports.after = ["startup"];
|
||||
exports.before = ["story"];
|
||||
exports.synchronous = true;
|
||||
|
||||
var widget = require("$:/core/modules/widgets/widget.js");
|
||||
|
||||
exports.startup = function() {
|
||||
// Install the modal message mechanism
|
||||
$tw.modal = new $tw.utils.Modal($tw.wiki);
|
||||
|
@ -20,6 +20,8 @@ exports.synchronous = true;
|
||||
// Set to `true` to enable performance instrumentation
|
||||
var PERFORMANCE_INSTRUMENTATION = false;
|
||||
|
||||
var widget = require("$:/core/modules/widgets/widget.js");
|
||||
|
||||
exports.startup = function() {
|
||||
var modules,n,m,f;
|
||||
if($tw.browser) {
|
||||
@ -51,13 +53,15 @@ 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
|
||||
});
|
||||
if($tw.browser) {
|
||||
$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
|
||||
|
Loading…
x
Reference in New Issue
Block a user