+ 1

Error on mobile device

I've got some errors on mobile device, but my web app runs completely fine on laptop and desktop. This is my app. https://code.sololearn.com/WiqPV3dMKXrB

2nd Dec 2021, 4:41 AM
Yan Moe Naing
Yan Moe Naing - avatar
3 Réponses
+ 3
Easy - Peasy! Just Move All The JS Section Code To The HTML Section With The HTML Script Tags
2nd Dec 2021, 7:26 AM
Sancho Godinho
Sancho Godinho - avatar
+ 2
This happens because the app loads content of the JS section in advance (inserted in <head>), so the script is run while the document (and other resources) is still in loading stage. Wrap your code (in JS section) in "load" event handler window.onload = () => { // your JS code here ... }
2nd Dec 2021, 7:46 AM
Ipang
+ 2
Ipang Thanks. I have fixed it.
2nd Dec 2021, 8:00 AM
Yan Moe Naing
Yan Moe Naing - avatar