(root, elements)
| 3416 | |
| 3417 | |
| 3418 | function jqLiteAddNodes(root, elements) { |
| 3419 | // THIS CODE IS VERY HOT. Don't make changes without benchmarking. |
| 3420 | |
| 3421 | if (elements) { |
| 3422 | |
| 3423 | // if a Node (the most common case) |
| 3424 | if (elements.nodeType) { |
| 3425 | root[root.length++] = elements; |
| 3426 | } else { |
| 3427 | var length = elements.length; |
| 3428 | |
| 3429 | // if an Array or NodeList and not a Window |
| 3430 | if (typeof length === 'number' && elements.window !== elements) { |
| 3431 | if (length) { |
| 3432 | for (var i = 0; i < length; i++) { |
| 3433 | root[root.length++] = elements[i]; |
| 3434 | } |
| 3435 | } |
| 3436 | } else { |
| 3437 | root[root.length++] = elements; |
| 3438 | } |
| 3439 | } |
| 3440 | } |
| 3441 | } |
| 3442 | |
| 3443 | |
| 3444 | function jqLiteController(element, name) { |
no outgoing calls
no test coverage detected