<div class="box">
  
</div>
<script>
if (CSS.paintWorklet) {              CSS.paintWorklet.addModule('/t_afif/pen/e502f34b89dcc6778d4cdb624a699029.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);
    }
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.