There's a certain site (getting to its subpage requires you to log in, therefore no link pasted) on which MutationObserver doesn't work, not at all.
This is the code:
const config = { attributes: true, childList: true, subtree: true };
const callback = (list, obs) => {
for (const mut of list) console.log(mut);
};
const obs = new MutationObserver(callback);
obs.observe(document.body, config);
I know iFrames mess up MutationObservers, and it seems there's six of them total. Nevertheless, I'm observing the body element, and the iFrames are located very deeply into the DOM, therefore there's a lot of changes happening that should be observed anyway.
What could be the reason why MutationObservers aren't working? What are some of the popular ones?
Please, feel free to ask any questions that might help troubleshoot.
The MutationObserver works just fine.
Somebody substituted an empty function for console.log, hence all the confusion.