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

Function jqLiteAddNodes

lib/test/angular/1.4.3/angular.js:2909–2932  ·  view source on GitHub ↗
(root, elements)

Source from the content-addressed store, hash-verified

2907
2908
2909function jqLiteAddNodes(root, elements) {
2910 // THIS CODE IS VERY HOT. Don't make changes without benchmarking.
2911
2912 if (elements) {
2913
2914 // if a Node (the most common case)
2915 if (elements.nodeType) {
2916 root[root.length++] = elements;
2917 } else {
2918 var length = elements.length;
2919
2920 // if an Array or NodeList and not a Window
2921 if (typeof length === 'number' && elements.window !== elements) {
2922 if (length) {
2923 for (var i = 0; i < length; i++) {
2924 root[root.length++] = elements[i];
2925 }
2926 }
2927 } else {
2928 root[root.length++] = elements;
2929 }
2930 }
2931 }
2932}
2933
2934
2935function jqLiteController(element, name) {

Callers 2

JQLiteFunction · 0.70
angular.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected