Why won’t the append child function work? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Why won’t the append child function work?

https://code.sololearn.com/WkLn8EVZJIpC/?ref=app I’m trying to create a text node and append it to an existing p element

25th Nov 2018, 8:12 PM
Thomas Czernek
Thomas Czernek - avatar
1 Réponse
+ 5
sololearn does not wait for your dom to load before executing your JavaScript code. always wrap your code in a window.onload https://code.sololearn.com/WW718N5J2H7X/?ref=app
25th Nov 2018, 9:07 PM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar