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

Function jqLiteAddNodes

lib/test/angular/1.8.0/angular.js:3506–3529  ·  view source on GitHub ↗
(root, elements)

Source from the content-addressed store, hash-verified

3504
3505
3506function jqLiteAddNodes(root, elements) {
3507 // THIS CODE IS VERY HOT. Don't make changes without benchmarking.
3508
3509 if (elements) {
3510
3511 // if a Node (the most common case)
3512 if (elements.nodeType) {
3513 root[root.length++] = elements;
3514 } else {
3515 var length = elements.length;
3516
3517 // if an Array or NodeList and not a Window
3518 if (typeof length === 'number' && elements.window !== elements) {
3519 if (length) {
3520 for (var i = 0; i < length; i++) {
3521 root[root.length++] = elements[i];
3522 }
3523 }
3524 } else {
3525 root[root.length++] = elements;
3526 }
3527 }
3528 }
3529}
3530
3531
3532function jqLiteController(element, name) {

Callers 2

JQLiteFunction · 0.70
angular.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected