Draft This page is not complete.
This is an experimental technologyCheck the Browser compatibility table carefully before using this in production.
Secure contextThis feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
paintWorklet
is a static, read-only property of the CSS
interface that provides access to the PaintWorklet
, which programmatically generates an image where a CSS property expects a file.
Syntax
var worklet = CSS.paintWorklet;
Value
The PaintWorklet
object.
Examples
The following example demonstrates loading a PaintWorklet
from its js file and does so by feature detection.
<script>
if ('paintWorklet' in CSS) {
CSS.paintWorklet.addModule('checkerboard.js');
}
</script>
Specifications
Specification | Status | Comment |
CSS Painting API Level 1The definition of 'paintWorklet' in that specification. | Working Draft | Initial definition. |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Chrome
Full support 65 |
Edge
Full support 79 |
Firefox
No support No |
IE
No support No |
Opera
Full support 52 |
Safari
No support No |
WebView Android
Full support 65 |
Chrome Android
Full support 65 |
Firefox Android
No support No |
Opera Android
Full support 47 |
Safari iOS
No support No |
Samsung Internet Android
Full support 9.0 |
Legend
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.'
- Experimental. Expect behavior to change in the future.
See Also
CSS.paintWorklet (Static property) by Mozilla Contributors is licensed under CC-BY-SA 2.5.