Why wonā€™t the append child function work? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
+ 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