赞
踩
const config = { attributes: true, childList: true, subtree: true };
const callback = (mutationsList, observer) => {
let getBoundingClientRect = this.getBoundingClientRect()
console.log('postion', `left: ${getBoundingClientRect.left}`, `bottom: ${getBoundingClientRect.bottom}`, mutationsList)
};
const observer = new MutationObserver(callback);
observer.observe(this, config);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。