1 2Getting the polyfill 3-------------------- 4 5There are three ways to get a copy of the polyfill: 6 71. Download and use the `web-animations.min.js` file directly from this repository 81. Using npm: Add [`web-animations-js`](https://www.npmjs.com/package/web-animations-js) to your `package.json` 91. Using Bower: Add `web-animations/web-animations-js` to your `bower.json` 10 11Browser support 12--------------- 13 14The polyfill is supported on modern versions of all major browsers, including: 15 16* Chrome 55+ 17* Firefox 27+ 18* IE10+ (including Edge) 19* Safari (iOS) 7.1+ 20* Safari (Mac) 9+ 21 22Native fallback 23--------------- 24 25When the polyfill runs on a browser that implements `Element.animate()` and 26`Animation` playback control, it will detect and use the underlying native 27features for better performance. 28 29Features 30-------- 31 32The `web-animations.min.js` polyfill target tracks the Web Animations features 33that are supported natively in browsers. These include: 34 35* Element.animate() 36* Timing input (easings, duration, fillMode, etc.) for animation effects 37* Playback control (play, pause, reverse, currentTime, cancel, onfinish) 38* Support for animating CSS properties 39 40Caveat: Prefix handling 41----------------------- 42 43The polyfill will automatically detect the correctly prefixed name to use when 44writing animated properties back to the platform. Where possible, the polyfill 45will only accept unprefixed versions of experimental features. For example: 46 47```js 48element.animate({transform: ['none', 'translateX(100px)']}, 1000); 49``` 50 51will work in all browsers that implement a conforming version of transform, but 52 53```js 54element.animate({webkitTransform: ['none', 'translateX(100px)']}, 1000); 55``` 56 57will not work anywhere. 58 59Process for breaking changes 60---------------------------- 61 62When we make a potentially breaking change to the polyfill's API 63surface (like a rename) we will, where possible, continue supporting the 64old version, deprecated, for three months, and ensure that there are 65console warnings to indicate that a change is pending. After three 66months, the old version of the API surface (e.g. the old version of a 67function name) will be removed. *If you see deprecation warnings, you 68can't avoid them by not updating*. 69 70