Object #<Object> has no method 'addEventListener'
<p>I have my canvas saved as an object but it won't let me add an eventListener because it creates this error:</p>

<pre><code>Object #&lt;Object&gt; has no method 'addEventListener' 
</code></pre>

<p>This is how i create the canvas:</p>

<pre><code>    var i = 1;
    document.getElementById("G").innerHTML += '&lt;canvas id="layer'+i+'" class="c" style="z-index:'+i+';"&gt;&lt;/canvas&gt;'; 
    temp = document.getElementById('layer'+i);
    objname = 'canvas'+i;
    canvas[objname] = new Object();
    canvas[objname].ctx =  temp.getContext("2d");   
</code></pre>

<p>Then i do:</p>

<pre><code>canvas.canvas1.addEventListener("mousedown", fnc_test, false);
</code></pre>

<p>Any ideas why this is not allowed, or where I am going wrong??</p>
