<div class="box">
</div>
<script>
if (CSS.paintWorklet) { CSS.paintWorklet.addModule('/t_afif/pen/qBmdbbR.js');
}
</script>
.box {
height: 100px;
background:paint(draw);
}
registerPaint('draw', class {
paint(ctx, size) {
ctx.fillStyle = 'red';
ctx.fillRect(0, 0, size.width, size.height);
}
});
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.