mirror of
https://github.com/animate-css/animate.css.git
synced 2024-09-28 22:11:31 +02:00
Improvement of animationend event - docs (#1197)
* Improvement of animationend event - docs
This commit is contained in:
parent
09c6e3ee8a
commit
893cd44e0a
@ -1121,7 +1121,8 @@ element.style.setProperty('--animate-duration', '0.5s');
|
|||||||
node.classList.add(`${prefix}animated`, animationName);
|
node.classList.add(`${prefix}animated`, animationName);
|
||||||
|
|
||||||
// When the animation ends, we clean the classes and resolve the Promise
|
// When the animation ends, we clean the classes and resolve the Promise
|
||||||
function handleAnimationEnd() {
|
function handleAnimationEnd(event) {
|
||||||
|
event.stopPropagation();
|
||||||
node.classList.remove(`${prefix}animated`, animationName);
|
node.classList.remove(`${prefix}animated`, animationName);
|
||||||
resolve('Animation ended');
|
resolve('Animation ended');
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,8 @@ const animateCSS = (element, animation, prefix = 'animate__') =>
|
|||||||
node.classList.add(`${prefix}animated`, animationName);
|
node.classList.add(`${prefix}animated`, animationName);
|
||||||
|
|
||||||
// When the animation ends, we clean the classes and resolve the Promise
|
// When the animation ends, we clean the classes and resolve the Promise
|
||||||
function handleAnimationEnd() {
|
function handleAnimationEnd(event) {
|
||||||
|
event.stopPropagation();
|
||||||
node.classList.remove(`${prefix}animated`, animationName);
|
node.classList.remove(`${prefix}animated`, animationName);
|
||||||
resolve('Animation ended');
|
resolve('Animation ended');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user