OLD | NEW |
(Empty) | |
| 1 |
| 2 Getting the polyfill |
| 3 -------------------- |
| 4 |
| 5 There are three ways to get a copy of the polyfill: |
| 6 |
| 7 1. Download and use the `web-animations.min.js` file directly from this reposito
ry |
| 8 1. Using npm: Add [`web-animations-js`](https://www.npmjs.com/package/web-animat
ions-js) to your `package.json` |
| 9 1. Using Bower: Add `web-animations/web-animations-js` to your `bower.json` |
| 10 |
| 11 Browser support |
| 12 --------------- |
| 13 |
| 14 The 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 |
| 22 Native fallback |
| 23 --------------- |
| 24 |
| 25 When the polyfill runs on a browser that implements `Element.animate()` and |
| 26 `Animation` playback control, it will detect and use the underlying native |
| 27 features for better performance. |
| 28 |
| 29 Features |
| 30 -------- |
| 31 |
| 32 The `web-animations.min.js` polyfill target tracks the Web Animations features |
| 33 that 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 |
| 40 Caveat: Prefix handling |
| 41 ----------------------- |
| 42 |
| 43 The polyfill will automatically detect the correctly prefixed name to use when |
| 44 writing animated properties back to the platform. Where possible, the polyfill |
| 45 will only accept unprefixed versions of experimental features. For example: |
| 46 |
| 47 ```js |
| 48 element.animate({transform: ['none', 'translateX(100px)']}, 1000); |
| 49 ``` |
| 50 |
| 51 will work in all browsers that implement a conforming version of transform, but |
| 52 |
| 53 ```js |
| 54 element.animate({webkitTransform: ['none', 'translateX(100px)']}, 1000); |
| 55 ``` |
| 56 |
| 57 will not work anywhere. |
| 58 |
| 59 Process for breaking changes |
| 60 ---------------------------- |
| 61 |
| 62 When we make a potentially breaking change to the polyfill's API |
| 63 surface (like a rename) we will, where possible, continue supporting the |
| 64 old version, deprecated, for three months, and ensure that there are |
| 65 console warnings to indicate that a change is pending. After three |
| 66 months, the old version of the API surface (e.g. the old version of a |
| 67 function name) will be removed. *If you see deprecation warnings, you |
| 68 can't avoid them by not updating*. |
| 69 |
OLD | NEW |