I get an error Uncaught TypeError: canv.getContent is not a function what to do?
-
With this code:
<DOOCTYPE html> <meta charset = "UTF-8"> <html> <body style = "margin: 0;"> <style> </style> <canvas id = "canvas"></canvas> <script> var canv = document.getElementById("canvas"); ctx = canv.getContext('2d') canv.width = window.innerWidth; canv.height = window.innerHeight; canv.fillRect(0, 0, 10, 10); </script> </body> </html>
I get an error Uncaught TypeError: canv.getContent is not a function what to do?JavaScript Elisabeth Patrick, Mar 4, 2020
0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!