This feature, mutation events using DOMSubtreeModified
etc, is now being dropped completely. as shown here, but you can use MutationObserver instead specs here
A simple example on how to use it taken from here this:
// select the target node
var target = document.querySelector('#some-id');
// create an observer instance
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
console.log(mutation.type);
});
});
// configuration of the observer:
var config = { attributes: true, childList: true, characterData: true }
// pass in the target node, as well as the observer options
observer.observe(target, config);
// later, you can stop observing
observer.disconnect();
You can get all the configuration parameters for the observer config object here MutationObserverInit