CSS Paint API Polyfill

Category: Javascript , Recommended | May 20, 2018
Author: GoogleChromeLabs
Views Total: 194
Official Page: Go to website
Last Update: May 20, 2018
License: MIT


CSS Paint API Polyfill


This is a JavaScript Polyfill to implement the CSS Paint API on web browsers that do not support it.

The CSS Paint API is a new feature introduced in Chrome 65 that allows you to programmatically generate an image whenever a CSS property expects an image.

How to use it:

Install & download the CSS Paint API Polyfill.

$ npm install css-paint-polyfill --save

Import the CSS Paint API Polyfill.

import 'css-paint-polyfill';

// or

Or include the CSS Paint API Polyfill from a CDN.

<script src="https://unpkg.com/css-paint-polyfill/dist/css-paint-polyfill.js"></script>

Leave a Reply