GoogleChromeLabs / css-paint-polyfill
- понедельник, 21 мая 2018 г. в 00:16:39
JavaScript
A polyfill for the CSS Paint API, with special browser optimizations.
This is a polyfill for the CSS Paint API.
Performance is quite good in Firefox and Safari courtesy of -webkit-canvas() and -moz-element(). For the remaining browsers, framerate is govered by Canvas toDataURL() / toBlob() speed.
<script src="css-paint-polyfill.js"></script>
<!-- or: -->
<script src="https://unpkg.com/css-paint-polyfill/dist/css-paint-polyfill.js"></script>Or with a bundler:
import 'css-paint-polyfill';... or with ES Modules on the web:
import('https://unpkg.com/css-paint-polyfill/dist/css-paint-polyfill.js');