23rd Oct 2018, 11:40 PM
EYOEL ASFAW
EYOEL ASFAW - avatar
3 Answers
+ 4
The same issue as 70% of JS code not working threads in here. This is because your script loads before DOM. To fix this, wrap your entire JS within: window.onload = function() { // Your JS here } This fixes the problem with null on getContext().
23rd Oct 2018, 11:46 PM
Hatsy Rei
Hatsy Rei - avatar
+ 2
EYOEL ASFAW the source of your image is supposed to be an URL instead of an absolute path to a file in your computer. You can upload your image to an image hosting site and copy the link to your code. https://www.sololearn.com/discuss/389765/?ref=app
24th Oct 2018, 1:23 AM
HoĂ ng Nguyễn Văn
HoĂ ng Nguyễn Văn - avatar
+ 1
but it doesn't work
24th Oct 2018, 12:23 AM
EYOEL ASFAW
EYOEL ASFAW - avatar