K
K
Kifoter2020-10-05 11:15:54
JavaScript
Kifoter, 2020-10-05 11:15:54

I get the error Uncaught TypeError: canv.getContent is not a function, what should I 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 the error Uncaught TypeError: canv.getContent is not a function what to do?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question