(root, elements)
| 2684 | |
| 2685 | |
| 2686 | function jqLiteAddNodes(root, elements) { |
| 2687 | // THIS CODE IS VERY HOT. Don't make changes without benchmarking. |
| 2688 | |
| 2689 | if (elements) { |
| 2690 | |
| 2691 | // if a Node (the most common case) |
| 2692 | if (elements.nodeType) { |
| 2693 | root[root.length++] = elements; |
| 2694 | } else { |
| 2695 | var length = elements.length; |
| 2696 | |
| 2697 | // if an Array or NodeList and not a Window |
| 2698 | if (typeof length === 'number' && elements.window !== elements) { |
| 2699 | if (length) { |
| 2700 | for (var i = 0; i < length; i++) { |
| 2701 | root[root.length++] = elements[i]; |
| 2702 | } |
| 2703 | } |
| 2704 | } else { |
| 2705 | root[root.length++] = elements; |
| 2706 | } |
| 2707 | } |
| 2708 | } |
| 2709 | } |
| 2710 | |
| 2711 | |
| 2712 | function jqLiteController(element, name) { |
no outgoing calls
no test coverage detected