I have a div with dynamically changing number of children elements. Is it possible to track when the div have no children via element.addEventListener? Ultimately I need something like this:
myDiv.addEventListener('properEvent', event => { if(event.target.childElementCount !=0) { doSomethingWithIt() } })
1.4m articles
1.4m replys
5 comments
57.0k users