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