Closed RitaHC closed 1 year ago
Based on what I was searching and trying out, it looks like you cannot use addEventListener
with drawImage
as nothing is returned for that value.
https://stackoverflow.com/questions/2664485/html5-adding-an-eventlistener-to-a-drawn-image-on-canvas
What's the problem you're trying to solve?
--> I've created a home image on my canvas, BUT UNABLE TO ADD AN EVENT LISTENER TO THE IMAGE
Post any code you think might be relevant (one fenced block per file)
If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?
---> Event Listener is not working ---> script.js:328 Uncaught TypeError: Cannot read properties of undefined (reading 'addEventListener') at home (script.js:328:13) at animate (script.js:302:10)
What is your best guess as to the source of the problem?
---> Consoled the value of the homeBtn (value-unidentified) - unable to resolve the issue
What things have you already tried to solve the problem?
Online resources/MDN/videos
Paste a link to your repository here
--- >https://github.com/RitaHC/Raven-Hunt