blob: 4ed661feefa51a8fe2c4c07a2535163f4aaa859e [file] [edit]
<!DOCTYPE html>
<html>
<body style="font-family: Ahem">
<canvas id="onscreen" width="100" height="10""></canvas>
<script>
const canvas = document.getElementById('onscreen');
const context = canvas.getContext('2d');
const square = new Path2D();
square.rect(0, 0, 100, 10);
context.fillStyle = 'green';
context.fill(square);
</script>
</body>
</html>