+ 5
Why I am unable to get the context of canvas in this code?
I want to get the context but I am unable . Please help!! https://code.sololearn.com/W4BDnjv2nhob/?ref=app
5 Antworten
+ 1
You should add onload event to load HTML first. Look at the code.
https://code.sololearn.com/W4gzTC91cUjL/?ref=app
+ 6
TheWh¡teCat okay that means we need to use window onload function when we arw writing it in the js tab.
Thanks for clearing all of my queries😊😊👍.
+ 5
TheWh¡teCat is it necessary to define an onload function.
I mean why the onload function is not defined here?
https://www.sololearn.com/learn/HTML/2201/
+ 1
If you do it in the HTML "script" tag it is loaded together with HTML. See the other example
https://code.sololearn.com/WjQpw4BqyU6f/?ref=app
+ 1
Prince PS , you are welcome. I'm happy to help 😉