Question: Something like I am have:

```

    function mouseClick(event) {
        ...
    }
    canvas.addEventListener("mousedown", mouseClick, false);
    function drawRect(x, y) {
        context.fillRect(x, y, 16, 16);
    };
    drawRect(10, 10);

```

How to do something like if I am click on my Rect in Canvas get something? something like If I am click on Rect get alert;

Sorry for my English language.

Answer: 
I think what you're saying is that you want events to occur when you click on objects you have drawn on a canvas. I have written a few [tutorials](http://simonsarris.com/blog/140-canvas-moving-selectable-shapes) on how to make persistent shapes and move them around with mouse clicks. That should give you a good starting point for this.
`addEventListener` is tricky. What I would try is 

`canvas.addEventListener.apply(canvas, ["mousedown", mouseClick, false]);`

or use an anonymous function.

`canvas.addEventListener.apply(canvas, ["mousedown", function(){ mouseClick(); }, false]);`

Using the apply function can help make sure the `eventListener` is applied to the right element. You can read about it [here](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/function/apply).