How to check if the Paint API is supported in the browser in javascript?

RMAG news

You can check browser compatibility or browser support for the Paint API (registerPaint, PaintWorkletGlobalScope, devicePixelRatio) from Houdini CSS in the following way:

import { isPaintSupported } from houdini-toolkit;

if (isPaintSupported) {
CSS.paintWorklet.addModule(checkboardWorklet.js);
}

Leave a Reply

Your email address will not be published. Required fields are marked *