title: Can't getContext of canvas
body: <p>I'm facing a problem when i want to get the context of a canvas.
  Here is the HTML code:</p>
  
  <pre><code>&lt;canvas id="thecanvas" width="600" height="300"&gt;&lt;/canvas&gt;
  </code></pre>
  
  <p>and the Javascript:</p>
  
  <pre><code>var canvaso = document.getElementById('thecanvas');
  if (!canvaso) {
      alert('Error: Cannot find the canvas element!');
      return;
  }
  if (!canvaso.getContext) {
      alert('Error: Canvas context does not exist!');
      return;
  }
  </code></pre>
  
  <p>The "canvaso" variable is correctly loaded, but it failed on "canvaso.getContext":</p>
  
  <pre><code>Uncaught TypeError: Object #&lt;HTMLDivElement&gt; has no method 'getContext' 
  </code></pre>
  
  <p>Thanks for your help.</p>