I'm trying to get the value of an element. but I'm facing a problem.
when the dom content is loaded after some time that element gets added.
and If I try to select it I get null. I have tried window.addEventListener('DOMContentLoaded', doSomething)
but It didn't helped me.
I have done something similar with an img element by adding the load
event listener. but I can't add the load event listener here because it's null
.
document.querySelector('.some-element')
How can I do this?