2015-03-25 23:33:11 +00:00
|
|
|
define([], function () {
|
2015-07-08 19:28:26 +00:00
|
|
|
return function (tag) {
|
|
|
|
if (!tag)
|
2016-05-22 11:23:43 +00:00
|
|
|
tag = "div";
|
2015-07-08 19:28:26 +00:00
|
|
|
|
2016-05-22 11:23:43 +00:00
|
|
|
var self = this;
|
2015-03-25 23:33:11 +00:00
|
|
|
|
2016-05-22 11:23:43 +00:00
|
|
|
var container = document.createElement(tag);
|
2015-03-25 23:33:11 +00:00
|
|
|
|
|
|
|
self.add = function (d) {
|
2016-05-22 11:23:43 +00:00
|
|
|
d.render(container);
|
|
|
|
};
|
2015-03-25 23:33:11 +00:00
|
|
|
|
|
|
|
self.render = function (el) {
|
2016-05-22 11:23:43 +00:00
|
|
|
el.appendChild(container);
|
|
|
|
};
|
2015-03-25 23:33:11 +00:00
|
|
|
|
2016-05-22 11:23:43 +00:00
|
|
|
return self;
|
|
|
|
};
|
|
|
|
});
|