(root, elements)
| 3168 | |
| 3169 | |
| 3170 | function jqLiteAddNodes(root, elements) { |
| 3171 | // THIS CODE IS VERY HOT. Don't make changes without benchmarking. |
| 3172 | |
| 3173 | if (elements) { |
| 3174 | |
| 3175 | // if a Node (the most common case) |
| 3176 | if (elements.nodeType) { |
| 3177 | root[root.length++] = elements; |
| 3178 | } else { |
| 3179 | var length = elements.length; |
| 3180 | |
| 3181 | // if an Array or NodeList and not a Window |
| 3182 | if (typeof length === 'number' && elements.window !== elements) { |
| 3183 | if (length) { |
| 3184 | for (var i = 0; i < length; i++) { |
| 3185 | root[root.length++] = elements[i]; |
| 3186 | } |
| 3187 | } |
| 3188 | } else { |
| 3189 | root[root.length++] = elements; |
| 3190 | } |
| 3191 | } |
| 3192 | } |
| 3193 | } |
| 3194 | |
| 3195 | |
| 3196 | function jqLiteController(element, name) { |
no outgoing calls
no test coverage detected