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);
|
||||
|
||||
// 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);
|
||||
resolve('Animation ended');
|
||||
}
|
||||
|
|
|
@ -37,7 +37,8 @@ const animateCSS = (element, animation, prefix = 'animate__') =>
|
|||
node.classList.add(`${prefix}animated`, animationName);
|
||||
|
||||
// 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);
|
||||
resolve('Animation ended');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue