(root, elements)
| 3439 | |
| 3440 | |
| 3441 | function jqLiteAddNodes(root, elements) { |
| 3442 | // THIS CODE IS VERY HOT. Don't make changes without benchmarking. |
| 3443 | |
| 3444 | if (elements) { |
| 3445 | |
| 3446 | // if a Node (the most common case) |
| 3447 | if (elements.nodeType) { |
| 3448 | root[root.length++] = elements; |
| 3449 | } else { |
| 3450 | var length = elements.length; |
| 3451 | |
| 3452 | // if an Array or NodeList and not a Window |
| 3453 | if (typeof length === 'number' && elements.window !== elements) { |
| 3454 | if (length) { |
| 3455 | for (var i = 0; i < length; i++) { |
| 3456 | root[root.length++] = elements[i]; |
| 3457 | } |
| 3458 | } |
| 3459 | } else { |
| 3460 | root[root.length++] = elements; |
| 3461 | } |
| 3462 | } |
| 3463 | } |
| 3464 | } |
| 3465 | |
| 3466 | |
| 3467 | function jqLiteController(element, name) { |
no outgoing calls
no test coverage detected