Listen and perform action

0

Assuming I have a tag where values are commonly changed on my page, for example:

  <p id="valor"></p>

What do I have to do in javascript without jquery to stay listening to this change all the time and take action with every change?

    
asked by anonymous 17.07.2018 / 23:24

1 answer

0

Comment correction, DOMSubtreeModified was deprecated with new constructor MutationObserver() you can start here:

var observer = new MutationObserver(callback);

take a look at the mozila link link

Refe II: link

Ref III: link

    
17.07.2018 / 23:43