UNPKG

marko

Version:

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

25 lines (20 loc) 613 B
"use strict"; var VElement = require("../vdom").bz_; var i = 0; module.exports = function (tagName, attrs, childCount) { return new ConstVElement(tagName, attrs, childCount); }; function ConstVElement(tagName, attrs, childCount) { VElement.call(this, tagName, attrs, null, null, childCount, null, { i: i++ }); } ConstVElement.prototype = Object.create(VElement.prototype); ConstVElement.prototype.e = function (tagName, attrs, childCount) { var child = this.bR_( new ConstVElement(tagName, attrs, childCount) ); if (childCount === 0) { return this.cj_(); } else { return child; } };