(root, elements)
| 2639 | |
| 2640 | |
| 2641 | function jqLiteAddNodes(root, elements) { |
| 2642 | // THIS CODE IS VERY HOT. Don't make changes without benchmarking. |
| 2643 | |
| 2644 | if (elements) { |
| 2645 | |
| 2646 | // if a Node (the most common case) |
| 2647 | if (elements.nodeType) { |
| 2648 | root[root.length++] = elements; |
| 2649 | } else { |
| 2650 | var length = elements.length; |
| 2651 | |
| 2652 | // if an Array or NodeList and not a Window |
| 2653 | if (typeof length === 'number' && elements.window !== elements) { |
| 2654 | if (length) { |
| 2655 | for (var i = 0; i < length; i++) { |
| 2656 | root[root.length++] = elements[i]; |
| 2657 | } |
| 2658 | } |
| 2659 | } else { |
| 2660 | root[root.length++] = elements; |
| 2661 | } |
| 2662 | } |
| 2663 | } |
| 2664 | } |
| 2665 | |
| 2666 | |
| 2667 | function jqLiteController(element, name) { |
no outgoing calls
no test coverage detected