(root, elements)
| 2935 | |
| 2936 | |
| 2937 | function jqLiteAddNodes(root, elements) { |
| 2938 | // THIS CODE IS VERY HOT. Don't make changes without benchmarking. |
| 2939 | |
| 2940 | if (elements) { |
| 2941 | |
| 2942 | // if a Node (the most common case) |
| 2943 | if (elements.nodeType) { |
| 2944 | root[root.length++] = elements; |
| 2945 | } else { |
| 2946 | var length = elements.length; |
| 2947 | |
| 2948 | // if an Array or NodeList and not a Window |
| 2949 | if (typeof length === 'number' && elements.window !== elements) { |
| 2950 | if (length) { |
| 2951 | for (var i = 0; i < length; i++) { |
| 2952 | root[root.length++] = elements[i]; |
| 2953 | } |
| 2954 | } |
| 2955 | } else { |
| 2956 | root[root.length++] = elements; |
| 2957 | } |
| 2958 | } |
| 2959 | } |
| 2960 | } |
| 2961 | |
| 2962 | |
| 2963 | function jqLiteController(element, name) { |
no outgoing calls
no test coverage detected