You'll probably have to go along with T.J. Crowders recommendation to poll, however your code example isn't working for other reasons (it seems):
The documentation* for childList
says that it is used to monitor additions and removals of the target node's child elements.
* This is the first and only time I'll reference MSDN as opposed to MDN, because the MDN documentation for this is crap.
The record you should be observing is subtree:
Set to true to also monitor changes to all the target node's descendants
If you do that, then the code works in Firefox.
var target = document.querySelector('#content');
var observer = new MutationObserver(function(mutations) {
console.log(mutations);
});
var config = { attributes: true, childList: true, subtree: true, characterData: true };
observer.observe(target, config);
document.querySelector('button').addEventListener('click',function(){
target.style.height = '200px';
});
However, it still doesn't work in Chrome; likely because of the Chrome bug reported in this question.