(root, elements)
| 3393 | |
| 3394 | |
| 3395 | function jqLiteAddNodes(root, elements) { |
| 3396 | // THIS CODE IS VERY HOT. Don't make changes without benchmarking. |
| 3397 | |
| 3398 | if (elements) { |
| 3399 | |
| 3400 | // if a Node (the most common case) |
| 3401 | if (elements.nodeType) { |
| 3402 | root[root.length++] = elements; |
| 3403 | } else { |
| 3404 | var length = elements.length; |
| 3405 | |
| 3406 | // if an Array or NodeList and not a Window |
| 3407 | if (typeof length === 'number' && elements.window !== elements) { |
| 3408 | if (length) { |
| 3409 | for (var i = 0; i < length; i++) { |
| 3410 | root[root.length++] = elements[i]; |
| 3411 | } |
| 3412 | } |
| 3413 | } else { |
| 3414 | root[root.length++] = elements; |
| 3415 | } |
| 3416 | } |
| 3417 | } |
| 3418 | } |
| 3419 | |
| 3420 | |
| 3421 | function jqLiteController(element, name) { |
no outgoing calls
no test coverage detected