| Total Complexity | 5 |
| Complexity/F | 1.25 |
| Lines of Code | 22 |
| Function Count | 4 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | define([], function () { |
||
| 2 | 'use strict'; |
||
| 3 | |||
| 4 | return function (tag) { |
||
| 5 | if (!tag) { |
||
| 6 | tag = 'div'; |
||
| 7 | } |
||
| 8 | |||
| 9 | var self = this; |
||
| 10 | var container = document.createElement(tag); |
||
| 11 | |||
| 12 | self.add = function add(d) { |
||
| 13 | d.render(container); |
||
| 14 | }; |
||
| 15 | |||
| 16 | self.render = function render(el) { |
||
| 17 | el.appendChild(container); |
||
| 18 | }; |
||
| 19 | |||
| 20 | return self; |
||
| 21 | }; |
||
| 22 | }); |
||
| 23 |