Your IP : 108.162.216.193


Current Path : /var/www/element/data/www/revenuestory.ru/bitrix/js/landing/main/src/internal/
Upload File :
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);
	}));
}