(root, elements)
| 2907 | |
| 2908 | |
| 2909 | function jqLiteAddNodes(root, elements) { |
| 2910 | // THIS CODE IS VERY HOT. Don't make changes without benchmarking. |
| 2911 | |
| 2912 | if (elements) { |
| 2913 | |
| 2914 | // if a Node (the most common case) |
| 2915 | if (elements.nodeType) { |
| 2916 | root[root.length++] = elements; |
| 2917 | } else { |
| 2918 | var length = elements.length; |
| 2919 | |
| 2920 | // if an Array or NodeList and not a Window |
| 2921 | if (typeof length === 'number' && elements.window !== elements) { |
| 2922 | if (length) { |
| 2923 | for (var i = 0; i < length; i++) { |
| 2924 | root[root.length++] = elements[i]; |
| 2925 | } |
| 2926 | } |
| 2927 | } else { |
| 2928 | root[root.length++] = elements; |
| 2929 | } |
| 2930 | } |
| 2931 | } |
| 2932 | } |
| 2933 | |
| 2934 | |
| 2935 | function jqLiteController(element, name) { |
no outgoing calls
no test coverage detected