function qwerty(){ this.abc=10; ....... this.eventProcesser=function(evt){...} canvas.addEventListener("click",this.eventProcesser,false); } var a=new qwerty();