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

Function stripCommentsFromElement

lib/test/angular/1.4.3/angular-animate.js:80–105  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

78}
79
80function stripCommentsFromElement(element) {
81 if (element instanceof jqLite) {
82 switch (element.length) {
83 case 0:
84 return [];
85 break;
86
87 case 1:
88 // there is no point of stripping anything if the element
89 // is the only element within the jqLite wrapper.
90 // (it's important that we retain the element instance.)
91 if (element[0].nodeType === ELEMENT_NODE) {
92 return element;
93 }
94 break;
95
96 default:
97 return jqLite(extractElementNode(element));
98 break;
99 }
100 }
101
102 if (element.nodeType === ELEMENT_NODE) {
103 return jqLite(element);
104 }
105}
106
107function extractElementNode(element) {
108 if (!element[0]) return element;

Callers 1

queueAnimationFunction · 0.70

Calls 1

extractElementNodeFunction · 0.70

Tested by

no test coverage detected