Javascript canvas image causes TypeError despite using window.onload | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Javascript canvas image causes TypeError despite using window.onload

I'm trying to import an image to the canvas. I loaded the image in window onload. I tested the image in an <img> tag and it loads. I have no idea why it won't work. I preloaded it and tested the url. https://code.sololearn.com/WK23x01EHA19/?ref=app

9th May 2021, 7:56 PM
Clueless Coder
Clueless Coder - avatar
1 Answer
0
Mirielle Thanks
9th May 2021, 8:37 PM
Clueless Coder
Clueless Coder - avatar