次のコードがあります。
<body>
<canvas id="canvas" height="300" width="300" style="border:1px solid" />
</body>
<script>
function maze(canvas){
this.ctx = canvas[0].getContext("2d");
canvas.mousedown(down);
}
function down(e){
alert(this.ctx);
}
$(document).ready(function(e){
var m = new maze($('#canvas'))
});
</script>
ただし、 down 関数では this.ctx は未定義ですが、その理由は何ですか? (はい、jQuery 1.6.2 をインポートしています)