canvas drawImage of a div
===

I am trying to draw an image on to a canvas. My source is a div that has a collection of text and images. Is this possible to do? I have tried to put some code together but it failed as the canvas is empty.

**Div**

    <div id="puzzle">
    Some text
    <img src="sky" />
    text text
    <img src="sun.png />
    </div>

**code**

    <canvas id="mycanvas" width="300" height="150"></canvas>
    var canvas = document.getElementById("mycanvas");
    var ctx = ccanvas.getContext("2d");
    var img = document.getElementById("puzzle");
    img.onload = function(){
    	ctx.drawImage(img,0,0,40,40);
    }