blob: cb8a15dae9954dd4fdbef3463c5c1c9c7aaeec63 [file] [log] [blame]
<body>
<canvas id="canvas" width="200" height="200"></canvas>
<script>
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
const width = canvas.width;
const height = canvas.height;
ctx.fillStyle = "green";
ctx.fillRect(0, 0, width / 2, height / 2);
</script>
</body>