title: Create 2d context *without* canvas
body: <p>I am currently looking for a way to create a canvas 2d rendering context without actually having a canvas element on the page. I could dynamically create a canvas element and hide it, but then again I don't want to show the image directly to the user anytime, so there's no point of actually having a canvas element in the page. So I'm basicly looking for something that is similar to</p>
  
  <pre><code>var image = new Image( );
  </code></pre>
  
  <p>but only for canvas 2d rendering context (pseudo code)</p>
  
  <pre><code>var context = new 2dContext( );
  </code></pre>
  
  <p>Is there functionality like this? I wasn't able to find anything like it. Calling</p>
  
  <pre><code>var context = new CanvasRenderingContext2D( );
  </code></pre>
  
  <p>which is the name of the rendering context interface by HTML5 spec just gives me awkward errors in Firefox:</p>
  
  <pre><code>uncaught exception: [Exception... "Cannot convert WrappedNative to function" nsresult: "0x8057000d (NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)" location: "JS frame :: http://localhost/ :: &lt;TOP_LEVEL&gt; :: line 25" data: no]
  </code></pre>