2015-03-26 00:33:11 +01:00
|
|
|
define([], function () {
|
2015-07-08 21:28:26 +02:00
|
|
|
return function (tag) {
|
2017-03-17 03:14:57 +01:00
|
|
|
if (!tag) {
|
|
|
|
tag = "div";
|
|
|
|
}
|
2015-07-08 21:28:26 +02:00
|
|
|
|
2017-03-17 03:14:57 +01:00
|
|
|
var self = this;
|
2015-03-26 00:33:11 +01:00
|
|
|
|
2017-03-17 03:14:57 +01:00
|
|
|
var container = document.createElement(tag);
|
2015-03-26 00:33:11 +01:00
|
|
|
|
|
|
|
self.add = function (d) {
|
2017-03-17 03:14:57 +01:00
|
|
|
d.render(container);
|
|
|
|
};
|
2015-03-26 00:33:11 +01:00
|
|
|
|
|
|
|
self.render = function (el) {
|
2017-03-17 03:14:57 +01:00
|
|
|
el.appendChild(container);
|
|
|
|
};
|
2015-03-26 00:33:11 +01:00
|
|
|
|
2017-03-17 03:14:57 +01:00
|
|
|
return self;
|
|
|
|
};
|
|
|
|
});
|