1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-24 12:17:39 +00:00

Switch to using $tw.fakeDocument for the fakedom document object

So that we can free us `$tw.document` to be the actual DOM document
This commit is contained in:
Jermolene
2014-01-15 14:57:35 +00:00
parent 839361d54f
commit 2c790d982f
7 changed files with 12 additions and 12 deletions

View File

@@ -130,8 +130,8 @@ exports.startup = function() {
// Set up the styles
var styleTemplateTitle = "$:/core/ui/PageStylesheet",
styleParser = $tw.wiki.parseTiddler(styleTemplateTitle);
$tw.styleWidgetNode = $tw.wiki.makeWidget(styleParser,{document: $tw.document});
$tw.styleContainer = $tw.document.createElement("style");
$tw.styleWidgetNode = $tw.wiki.makeWidget(styleParser,{document: $tw.fakeDocument});
$tw.styleContainer = $tw.fakeDocument.createElement("style");
$tw.styleWidgetNode.render($tw.styleContainer,null);
$tw.styleElement = document.createElement("style");
$tw.styleElement.innerHTML = $tw.styleContainer.textContent;