add event sample to html5 canvas