* Remove an animation with Animate CSS * @param {string} [element] div element to animate. * @param {string} [animation] animation name.
(element, animation)
| 146 | * @param {string} [animation] animation name. |
| 147 | */ |
| 148 | function removeAnimateCSS (element, animation) { |
| 149 | const animationName = `animate__${animation}`; |
| 150 | const node = document.getElementById(element); |
| 151 | if (!node) { |
| 152 | // don't execute animate: we don't find div |
| 153 | Log.warn("node not found for removing", element); |
| 154 | return; |
| 155 | } |
| 156 | node.classList.remove("animate__animated", animationName); |
| 157 | node.style.removeProperty("--animate-duration"); |
| 158 | } |
| 159 | if (typeof window === "undefined") module.exports = { AnimateCSSIn, AnimateCSSOut, addAnimateCSS, removeAnimateCSS }; |
no outgoing calls
no test coverage detected