So I have been rattling my brain about using the MutationObserver and I haven\'t made any progress. I\'ve read about it on the W3C site and in the MDN. When reading it in the MD
first you definitely should not use jQ selectors as they are not Node elements. second, you must be sure that query selector returns not null. To make sure try for the first time observer on document.body: it is definitely a Node object. Something like
(
new MutationObserver(function(mutationEventList){
console.log(mutationEventList)
})
)
.observe(document.body, {
childList: true,
attributes: true,
characterData: true
})
When you will get familiar with targeting an observer and understand MutationObserverInit options values(they are described not as good as it could) you will be able to work with mutationObserver right.