hopglass/lib/container.js
2015-09-04 14:23:45 +02:00

21 lines
313 B
JavaScript

define([], function () {
return function (tag) {
if (!tag)
tag = "div"
var self = this
var container = document.createElement(tag)
self.add = function (d) {
d.render(container)
}
self.render = function (el) {
el.appendChild(container)
}
return self
}
})