meshviewer/lib/container.js
Xaver Maierhofer 5600832305
[TASK] Move to es5 eslint airbnb
Step forward to es6 airbnb
2017-01-30 00:51:12 +01:00

24 lines
357 B
JavaScript

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