Computer Science, asked by Muskangarg6506, 1 year ago

Mouse event not being triggered on HTML5 canvas? How to solve it?

Answers

Answered by lastbenchstudent
0

take reference of canvas

attach eventListner to it with your action function

for example let's say I have to attaché mousedown event

canvas.addEventListner("mousedown", action, false)

function action (){

console.log("I am printed")

}

let me know if you are able to do that

Similar questions