| Current Path : /var/www/element/data/www/revenuestory.ru/bitrix/js/landing/main/src/internal/ |
| Current File : /var/www/element/data/www/revenuestory.ru/bitrix/js/landing/main/src/internal/on-animation-end.js |
import {Event} from 'main.core';
export default function onAnimationEnd(element: HTMLElement, animationName: string)
{
return new Promise(((resolve) => {
const onAnimationEndListener = (event) => {
if (!animationName || (event.animationName === animationName))
{
resolve(event);
Event.bind(element, 'animationend', onAnimationEndListener);
}
};
Event.bind(element, 'animationend', onAnimationEndListener);
}));
}