MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / stripCommentsFromElement

Function stripCommentsFromElement

lib/test/angular/1.7.0/angular-animate.js:113–136  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

111}
112
113function stripCommentsFromElement(element) {
114 if (element instanceof jqLite) {
115 switch (element.length) {
116 case 0:
117 return element;
118
119 case 1:
120 // there is no point of stripping anything if the element
121 // is the only element within the jqLite wrapper.
122 // (it's important that we retain the element instance.)
123 if (element[0].nodeType === ELEMENT_NODE) {
124 return element;
125 }
126 break;
127
128 default:
129 return jqLite(extractElementNode(element));
130 }
131 }
132
133 if (element.nodeType === ELEMENT_NODE) {
134 return jqLite(element);
135 }
136}
137
138function extractElementNode(element) {
139 if (!element[0]) return element;

Callers 1

queueAnimationFunction · 0.70

Calls 1

extractElementNodeFunction · 0.70

Tested by

no test coverage detected