MCPcopy
hub / github.com/angular-ui/ui-router / jqLiteAddNodes

Function jqLiteAddNodes

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

Source from the content-addressed store, hash-verified

3439
3440
3441function 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
3467function jqLiteController(element, name) {

Callers 2

JQLiteFunction · 0.70
angular.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected