How can i make it run? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
16th Apr 2024, 9:05 AM
uyiee_ dalubatan
uyiee_ dalubatan - avatar
1 Answer
+ 4
Place your whole js code inside this⤵️ It solve the error! window.onload = function() { //js code } About the error: The "addEventListener Error" commonly occurs when trying to attach an event listener to an element before the element has been fully loaded in the DOM. This can happen if the script containing the event listener is executed before the element exists in the HTML document.
16th Apr 2024, 9:24 AM
`нттp⁴⁰⁶
`нттp⁴⁰⁶ - avatar