(root, elements)
| 3019 | |
| 3020 | |
| 3021 | function jqLiteAddNodes(root, elements) { |
| 3022 | // THIS CODE IS VERY HOT. Don't make changes without benchmarking. |
| 3023 | |
| 3024 | if (elements) { |
| 3025 | |
| 3026 | // if a Node (the most common case) |
| 3027 | if (elements.nodeType) { |
| 3028 | root[root.length++] = elements; |
| 3029 | } else { |
| 3030 | var length = elements.length; |
| 3031 | |
| 3032 | // if an Array or NodeList and not a Window |
| 3033 | if (typeof length === 'number' && elements.window !== elements) { |
| 3034 | if (length) { |
| 3035 | for (var i = 0; i < length; i++) { |
| 3036 | root[root.length++] = elements[i]; |
| 3037 | } |
| 3038 | } |
| 3039 | } else { |
| 3040 | root[root.length++] = elements; |
| 3041 | } |
| 3042 | } |
| 3043 | } |
| 3044 | } |
| 3045 | |
| 3046 | |
| 3047 | function jqLiteController(element, name) { |
no outgoing calls
no test coverage detected