MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / jqLiteAddNodes

Function jqLiteAddNodes

web/static/bower_components/angular/angular.js:2937–2960  ·  view source on GitHub ↗
(root, elements)

Source from the content-addressed store, hash-verified

2935
2936
2937function jqLiteAddNodes(root, elements) {
2938 // THIS CODE IS VERY HOT. Don't make changes without benchmarking.
2939
2940 if (elements) {
2941
2942 // if a Node (the most common case)
2943 if (elements.nodeType) {
2944 root[root.length++] = elements;
2945 } else {
2946 var length = elements.length;
2947
2948 // if an Array or NodeList and not a Window
2949 if (typeof length === 'number' && elements.window !== elements) {
2950 if (length) {
2951 for (var i = 0; i < length; i++) {
2952 root[root.length++] = elements[i];
2953 }
2954 }
2955 } else {
2956 root[root.length++] = elements;
2957 }
2958 }
2959 }
2960}
2961
2962
2963function jqLiteController(element, name) {

Callers 2

JQLiteFunction · 0.85
angular.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected