Fixes animations failing when tab loaded and not visible. Because animation callbacks are paused when some browsers’ tabs are not visible, we can’t apply animations based on the browser support for CSS transitions alone. We also need to set up our animation event listeners and so any animations that occur while the page is loading should simply apply directly.