UNPKG

marko

Version:

UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.

26 lines (18 loc) 506 B
var inherit = require("raptor-util/inherit"); var VNode = require("./VNode"); function VText(value, ownerComponent) { this.___VNode(-1 /* no children */, ownerComponent); this.___nodeValue = value; } VText.prototype = { ___Text: true, ___nodeType: 3, ___actualize: function (host) { return (host.ownerDocument || host).createTextNode(this.___nodeValue); }, ___cloneNode: function () { return new VText(this.___nodeValue); }, }; inherit(VText, VNode); module.exports = VText;