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

Function stripCommentsFromElement

test/angular/1.4/angular-animate.js:131–156  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

129}
130
131function stripCommentsFromElement(element) {
132 if (element instanceof jqLite) {
133 switch (element.length) {
134 case 0:
135 return element;
136 break;
137
138 case 1:
139 // there is no point of stripping anything if the element
140 // is the only element within the jqLite wrapper.
141 // (it's important that we retain the element instance.)
142 if (element[0].nodeType === ELEMENT_NODE) {
143 return element;
144 }
145 break;
146
147 default:
148 return jqLite(extractElementNode(element));
149 break;
150 }
151 }
152
153 if (element.nodeType === ELEMENT_NODE) {
154 return jqLite(element);
155 }
156}
157
158function extractElementNode(element) {
159 if (!element[0]) return element;

Callers 1

queueAnimationFunction · 0.70

Calls 1

extractElementNodeFunction · 0.70

Tested by

no test coverage detected