diff --git a/core/boot.js b/core/boot.js index b573a69ec..ddef12d27 100644 --- a/core/boot.js +++ b/core/boot.js @@ -709,6 +709,10 @@ $tw.wiki.addTiddlers($tw.wiki.deserializeTiddlers("(DOM)",document.getElementByI $tw.wiki.addTiddlers($tw.wiki.deserializeTiddlers("(DOM)",document.getElementById("storeArea"))); // Load the shadow tiddlers from the DOM $tw.wiki.addTiddlers($tw.wiki.deserializeTiddlers("(DOM)",document.getElementById("shadowArea")),true); +// Load any preloaded tiddlers +if($tw.preloadTiddlers) { + $tw.wiki.addTiddlers($tw.preloadTiddlers,true); +} // End of if($tw.browser) } diff --git a/core/bootprefix.js b/core/bootprefix.js index ec69f6fe7..aa8d1fb25 100644 --- a/core/bootprefix.js +++ b/core/bootprefix.js @@ -31,3 +31,13 @@ $tw.modules.define = function(moduleName,moduleType,fn) { fn: fn }; }; + +/* +Define a tiddler +*/ +$tw.preloadTiddlers = $tw.preloadTiddlers || []; + +$tw.preloadTiddler = function(fields) { + $tw.preloadTiddlers.push(fields); +}; +