web api static property
CSS: paintWorklet static property
Limited availabilitySecure context
The static, read-only paintWorklet property of the CSS interface provides access to the
paint worklet, which programmatically generates an image where a CSS
property expects a file.
Value
The associated Worklet object.
Examples
The following example demonstrates loading a paint worklet from its js file and does so by feature detection.
if ("paintWorklet" in CSS) {
CSS.paintWorklet.addModule("checkerboard.js");
}
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.