mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Fixed issue with textnodes ignoring insertBefore parameter
This commit is contained in:
parent
0830cdac73
commit
558aaf338f
@ -29,9 +29,13 @@ Text.prototype.render = function(type) {
|
||||
return type === "text/html" ? $tw.utils.htmlEncode(this.text) : this.text;
|
||||
};
|
||||
|
||||
Text.prototype.renderInDom = function(domNode) {
|
||||
Text.prototype.renderInDom = function(parentDomNode,insertBefore) {
|
||||
this.domNode = document.createTextNode(this.text);
|
||||
domNode.appendChild(this.domNode);
|
||||
if(insertBefore) {
|
||||
parentDomNode.insertBefore(this.domNode,insertBefore);
|
||||
} else {
|
||||
parentDomNode.appendChild(this.domNode);
|
||||
}
|
||||
};
|
||||
|
||||
exports.Text = Text;
|
||||
|
Loading…
Reference in New Issue
Block a user