Мутационный наблюдатель JS
const observer = new MutationObserver(list => {
console.log('mutation list', list);
});
observer.observe(document.body, {
attributes: true,
childList: true,
subtree: true
});
// perform any DOM change action in your page. e.g. show/hide/remove
Anthony Smith