CSS Paint API Polyfill

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

Preview:

CSS Paint API Polyfill

Description:

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
$ npm install css-paint-polyfill --save

Import the CSS Paint API Polyfill.

import 'css-paint-polyfill';

// or
import('https://unpkg.com/css-paint-polyfill/dist/css-paint-polyfill.js');

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