To access each element of the nodeList?

Hello.
There is a challenge I need to dynamically added html elements a parent and all its descendants(level <div class="parent"><span></span></div>).
e.target is not suitable, because it is not happening click.
To circumvent the cycle nodeList document.querySelectorAll("name") is also not suitable, because I need to not all elements in Dom tree via the selector, but only one, newly added.
Is it possible to implement such a thing and how?
April 7th 20 at 15:17
1 answer
April 7th 20 at 15:19
Solution
Here is a crude example. Use MutationObserver.

In callback'e observer'and you can add elements created in a unique collection - Set and process them as You want.

Find more questions by tags JavaScript