DEV Community

Discussion on: Cannot add class but elements are already added to the DOM

 
brianemilius profile image
Brian Emilius

I'm sorry, that's my bad. I meant that I just would love to see how that function is made.

Thread Thread
 
dvgy profile image
GAURAV YADAV

Sure wait i will give u link of my code. github.com/DVGY/JavaScript-Project...

My code is here. Pls at Look index.js , searchView.js,base.js and Search.js

Thread Thread
 
brianemilius profile image
Brian Emilius • Edited

Ah yes, okay... I meant the insertAdjecentHTML, which is a native JS method.

I suspected it was using something similar to element.innerHTML under the hood, but the docs on MDN says it works differently.

This was my best bet, though. Sorry I can't help any more than that 😞