javascript 监测属性变化事件
var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutationRecord) { console.log(mutationRecord); }); }); var target = parent.document.getElementById('AAAssetCategory-link'); observer.observe(target, { attributes : true, attributeFilter : ['class'] });