+ 1
todolist local storage not working
Make this work. i cant understand why it is not working https://code.sololearn.com/WoLa2tJ3i67A/?ref=app
6 Answers
+ 1
daneillonge
What device are you using?
+ 1
Localstorage does not work from Code Playground.
+ 1
Calvin
From my experience when using the Sololearn app on my iPad I'm able to use local storage, as a matter of fact, daneillonge's code runs without any problems when I use my iPad. But when I use the Sololearn app on my android phone, I can't access local storage.
+ 1
ODLNT please check if ul list item append amd expand list as you add more todo. i have problem in my browser it keeps reassign the list item every time i add new todo.
+ 1
ODLNT im using android sololearn doesnt support html5 localstorage
0
daneillonge
When I run your code in a browser I get the dreaded "Uncaught TypeError: Cannot read property 'addEventListener' of null" which normally means you need to let the document load first before you try to access the DOM. I made a slight change to your code by adding window.addEventListener('DOMContentLoaded',todoList);
https://code.sololearn.com/Ww28e0ohTOIg/#js