c0726461fb
Most code is writen with semicolon and IDE shows errors in nearly every line
21 lines
323 B
JavaScript
21 lines
323 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;
|
|
};
|
|
});
|