getBoundingClientRect 和 IntersectionObserver为异步 是前端开发中用于处理元素位置和可见性的两个重要 API
getBoundingClientRect为同步,IntersectionObserver为异步,
兼容性方面getBoundingClientRect好于IntersectionObserver
不过IntersectionObserver从谷歌51版本开始就支持了
MutationObserver 可以用来监听 DOM 的任何变化,为异步操作