0
<solved>Compatibility issues?(android)
So I wrote this code and everything works just fine on my iPhone but when I testet it on android (I wanted to see how it looks on a different screen size) it showed me an error message. The error: "Uncaught TypeError: Cannot read properties of null (reading 'getContext') Line: 4" Can anybody explain what is happening and how I can fix this? https://code.sololearn.com/W74ue81u1ssd/?ref=app
2 Answers
+ 1
https://code.sololearn.com/W9eNFfSdrEOG/?ref=app
You should add before your code starts:
window.onload=function(){
And close the curly braces at the end.
}
+ 1
Thank you that worked š