MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / jqLiteAddNodes

Function jqLiteAddNodes

code/songhop/www/lib/angular/angular.js:2641–2664  ·  view source on GitHub ↗
(root, elements)

Source from the content-addressed store, hash-verified

2639
2640
2641function jqLiteAddNodes(root, elements) {
2642 // THIS CODE IS VERY HOT. Don't make changes without benchmarking.
2643
2644 if (elements) {
2645
2646 // if a Node (the most common case)
2647 if (elements.nodeType) {
2648 root[root.length++] = elements;
2649 } else {
2650 var length = elements.length;
2651
2652 // if an Array or NodeList and not a Window
2653 if (typeof length === 'number' && elements.window !== elements) {
2654 if (length) {
2655 for (var i = 0; i < length; i++) {
2656 root[root.length++] = elements[i];
2657 }
2658 }
2659 } else {
2660 root[root.length++] = elements;
2661 }
2662 }
2663 }
2664}
2665
2666
2667function jqLiteController(element, name) {

Callers 2

JQLiteFunction · 0.70
angular.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected