我在facebook上使用此代码
var target = document.querySelector('._38vo');
// create an observer instance
var observer = new MutationObserver(function(mutations) {
console.log(mutations)
mutations.forEach(function(mutation) {
console.log(mutation);
});
});
// pass in the target node, as well as the observer options
observer.observe(target, {attributes: true, childList: true, characterData: true});
其中._38vo是用户的个人资料。我希望我可以使用它来检测新项目是否已加载。但它没有用,嗯,为什么?