MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / cleanUpStyleSheets

Function cleanUpStyleSheets

core/src/utils/animation/animation.ts:205–218  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203 * from the DOM.
204 */
205 const cleanUpStyleSheets = () => {
206 stylesheets.forEach((stylesheet) => {
207 /**
208 * When sharing stylesheets, it's possible
209 * for another animation to have already
210 * cleaned up a particular stylesheet
211 */
212 if (stylesheet?.parentNode) {
213 stylesheet.parentNode.removeChild(stylesheet);
214 }
215 });
216
217 stylesheets.length = 0;
218 };
219
220 const beforeAddRead = (readFn: AnimationReadWriteCallback) => {
221 _beforeAddReadFunctions.push(readFn);

Callers 1

cleanUpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected