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

Function jqLiteAddNodes

test/angular/1.5/angular.js:3170–3193  ·  view source on GitHub ↗
(root, elements)

Source from the content-addressed store, hash-verified

3168
3169
3170function jqLiteAddNodes(root, elements) {
3171 // THIS CODE IS VERY HOT. Don't make changes without benchmarking.
3172
3173 if (elements) {
3174
3175 // if a Node (the most common case)
3176 if (elements.nodeType) {
3177 root[root.length++] = elements;
3178 } else {
3179 var length = elements.length;
3180
3181 // if an Array or NodeList and not a Window
3182 if (typeof length === 'number' && elements.window !== elements) {
3183 if (length) {
3184 for (var i = 0; i < length; i++) {
3185 root[root.length++] = elements[i];
3186 }
3187 }
3188 } else {
3189 root[root.length++] = elements;
3190 }
3191 }
3192 }
3193}
3194
3195
3196function jqLiteController(element, name) {

Callers 2

JQLiteFunction · 0.70
angular.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected