If you want to remove an element involved in this animation from the document altogether, doing so before the animation is complete causes the animation to abruptly stop. You should use the Promise to be notified when the animation completes and then remove the element from the document.