(root, elements)
| 3504 | |
| 3505 | |
| 3506 | function jqLiteAddNodes(root, elements) { |
| 3507 | // THIS CODE IS VERY HOT. Don't make changes without benchmarking. |
| 3508 | |
| 3509 | if (elements) { |
| 3510 | |
| 3511 | // if a Node (the most common case) |
| 3512 | if (elements.nodeType) { |
| 3513 | root[root.length++] = elements; |
| 3514 | } else { |
| 3515 | var length = elements.length; |
| 3516 | |
| 3517 | // if an Array or NodeList and not a Window |
| 3518 | if (typeof length === 'number' && elements.window !== elements) { |
| 3519 | if (length) { |
| 3520 | for (var i = 0; i < length; i++) { |
| 3521 | root[root.length++] = elements[i]; |
| 3522 | } |
| 3523 | } |
| 3524 | } else { |
| 3525 | root[root.length++] = elements; |
| 3526 | } |
| 3527 | } |
| 3528 | } |
| 3529 | } |
| 3530 | |
| 3531 | |
| 3532 | function jqLiteController(element, name) { |
no outgoing calls
no test coverage detected