Kevin Powell - CommunityKP-C
Kevin Powell - Community2y ago
10 replies
griff

keep getting "Uncaught TypeError: Cannot read properties of null (reading 'setAttribute)" error

hi, i am trying to implement a dark/light mode toggle into my code and keep getting this error -- i feel like the dev tools is trying to tell me its running JS before it loads or finds the elements targeted but everything looks right on my end. probably a silly mistake but wanted to get some more eyes on this:
Was this page helpful?