Listen element content changes

var someElement = document.querySelector('.some-class');
if(window.addEventListener) {
  // Normal browsers
  someElement.addEventListener('DOMSubtreeModified', someFunction, false);
} else if(window.attachEvent) {
  // IE
  someElement.attachEvent('DOMSubtreeModified', someFunction);
}
async function someFunction() {
  // Do something if someElement content change
}

Тут могла быть ваша реклама.