hopglass/lib/container.js
2017-03-21 22:53:34 +01:00

22 lines
331 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;
};
});