-
* `v3-infinite-loading@1.2.2`
I was caught on an issue: When the page was mounted, not every time the `@infinite` event was called.
After I added `console.log` to the IntersectionObserver callba…
-
Needed for https://github.com/servo/servo/issues/30822
Spec: https://w3c.github.io/IntersectionObserver
See also https://github.com/servo/servo/issues/31006 (somewhat similar)
-
## 简介
- 你想跟踪 DOM 树里的一个元素,当它进入可视区域时得到通知。
- 你想实现延迟加载图片功能
- 你需要知道用户是否真的在看一个广告 banner。
你可以通过绑定 `scroll` 事件或者用一个周期性的定时器,然后在回调函数中调用元素的 [`getBoundingClientRect()`](https://developer.mozilla.org/en-US…
-
Why not feature check for IntersectionObserver support and use it when available?
-
Starting work on alternate way of watching elements with using Intersection Observer to avoid constant listening to the scroll event.
-
IntersectionObserver接口提供了目标元素(target)在根元素(root)中可视状态变化的监听方法。
可以用来更方便的实现类似图片懒加载,滚动加载更多,或者一些滚屏动画效果
![123123 mov](https://user-images.githubusercontent.com/1720881/57836651-c35e3480-77f3-11e9-84b8-67…
-
I've noticed this components fails in angular SSR since they make use of intersectionObserver. I had to do check like so. Might save some head scratches if it was done in the lib itself.
readonly…
-
I'd suggest using `IntersectionObserver` when possible as I assume this is more performant:
https://developers.google.com/web/updates/2017/09/sticky-headers
-
-
As IntersectionObserver becomes standardized and more performant, it would seem smart to utilize that API, and fall-back to the current resize/etc events for browsers that need it.
Currently Intersec…