I am reading this http://lists.w3.org/Archives/Public/public-webapps/2011JulSep/1622.html and it looks like the behavior of Chrome is different from the specification. If I understand the specifications correctly, the definition of a "subtree" for an element means that changes in the subtree of this element (including the element itself) should be reported. However, when I execute this part of the code, I get nothing.
var observer = new WebKitMutationObserver(function(e){console.log(e);}) observer.observe(document.body, {subtree:true, attributes:true}); document.body.appendChild(document.createElement('div'));
What am I missing? Can anyone elaborate on this? Thanks!
source share