83

GitHub - GoogleChromeLabs/css-paint-polyfill: A polyfill for the CSS Paint API,...

 5 years ago
source link: https://github.com/GoogleChromeLabs/css-paint-polyfill
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

histore

Houdini's CSS Paint Polyfill npm

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.

Usage

<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');

To-Do

  • Add second options argument to addModule() (spec)
  • Extract addModule() into its own repo (spec)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK