<!-- Include the polyfill --> <script src="web-animations.min.js"></script> <!-- Set up a target to animate --> <div class="pulse" style="width: 150px;">Hello world!</div> <!-- Animate! --> <script> var elem = document.querySelector('.pulse'); var animation = elem.animate({ opacity: [0.5, 1], transform: ['scale(0.5)', 'scale(1)'], }, { direction: 'alternate', duration: 500, iterations: Infinity, }); </script>
For feedback on the API and the specification:
For issues with the polyfill, report them on GitHub: https://github.com/web-animations/web-animations-js/issues/new.
Breaking polyfill changes will be announced on this low-volume mailing list: web-animations-changes@googlegroups.com.