invalid-image-constructor-error-ref.html (251B)
1 <!DOCTYPE html> 2 <html> 3 <canvas id="canvas" width="100" height="100"></canvas> 4 <script> 5 var canvas = document.getElementById("canvas"); 6 var ctx = canvas.getContext('2d'); 7 ctx.fillStyle = 'green'; 8 ctx.fillRect(50, 50, 50, 50); 9 </script> 10 </html>