()
| 5188 | } |
| 5189 | |
| 5190 | function handleCSSClassChanges() { |
| 5191 | forEach(postDigestElements, function(element) { |
| 5192 | var data = postDigestQueue.get(element); |
| 5193 | if (data) { |
| 5194 | var existing = splitClasses(element.attr('class')); |
| 5195 | var toAdd = ''; |
| 5196 | var toRemove = ''; |
| 5197 | forEach(data, function(status, className) { |
| 5198 | var hasClass = !!existing[className]; |
| 5199 | if (status !== hasClass) { |
| 5200 | if (status) { |
| 5201 | toAdd += (toAdd.length ? ' ' : '') + className; |
| 5202 | } else { |
| 5203 | toRemove += (toRemove.length ? ' ' : '') + className; |
| 5204 | } |
| 5205 | } |
| 5206 | }); |
| 5207 | |
| 5208 | forEach(element, function(elm) { |
| 5209 | if (toAdd) { |
| 5210 | jqLiteAddClass(elm, toAdd); |
| 5211 | } |
| 5212 | if (toRemove) { |
| 5213 | jqLiteRemoveClass(elm, toRemove); |
| 5214 | } |
| 5215 | }); |
| 5216 | postDigestQueue.remove(element); |
| 5217 | } |
| 5218 | }); |
| 5219 | postDigestElements.length = 0; |
| 5220 | } |
| 5221 | |
| 5222 | |
| 5223 | function addRemoveClassesPostDigest(element, add, remove) { |
nothing calls this directly
no test coverage detected