I want the to destroy the animation when is complete animating. tried addEventListener
that didn't work.
anim = bodymovin.loadAnimation(params);
animContainer.addEventListener("complete", myScript);
function myScript(){
anim.destroy();
}
One way to go would be to listen for native 'transitionend' event on the element that is being animated.
element.addEventListener("transitionend", anim.destroy());