MCPcopy Create free account
hub / github.com/angular-ui/ui-router / jqLiteAddNodes

Function jqLiteAddNodes

test/angular/1.6/angular.js:3418–3441  ·  view source on GitHub ↗
(root, elements)

Source from the content-addressed store, hash-verified

3416
3417
3418function 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
3444function jqLiteController(element, name) {

Callers 2

JQLiteFunction · 0.70
angular.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected