1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 01:20:30 +00:00

Clarify rendering parameters

srcDocument.body.firstChild will in fact be null, but it’s clearer to
write it out
This commit is contained in:
Jermolene 2015-05-03 16:56:27 +01:00
parent 3f26492ac8
commit 0932c15e5c

View File

@ -57,7 +57,7 @@ exports.startup = function() {
// Render the text of the tiddler // Render the text of the tiddler
var parser = $tw.wiki.parseTiddler(template), var parser = $tw.wiki.parseTiddler(template),
widgetNode = $tw.wiki.makeWidget(parser,{document: srcDocument, parentWidget: $tw.rootWidget, variables: {currentTiddler: title}}); widgetNode = $tw.wiki.makeWidget(parser,{document: srcDocument, parentWidget: $tw.rootWidget, variables: {currentTiddler: title}});
widgetNode.render(srcDocument.body,null); widgetNode.render(srcDocument.body,srcDocument.body.firstChild);
// Function to handle refreshes // Function to handle refreshes
refreshHandler = function(changes) { refreshHandler = function(changes) {
if(styleWidgetNode.refresh(changes,styleContainer,null)) { if(styleWidgetNode.refresh(changes,styleContainer,null)) {