UNPKG

1.01 kBMarkdownView Raw
1This intersection observer component is an invisible watcher that emits events when it appears and
2dissapears from view.
3
4It acts a a vue-friendly wrapper around the [intersection observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).
5
6Because of it's simplicity you can use it for a lot of different things.
7It's especially helpful for the lazy loading of images, and infinite scrolling of lists.
8
9Anything slotted inside this component will become the element that is being observed.
10
11This slot can also be used as a fallback for the browsers that don't support the intersection
12observer, or in the case that the observer fails to work.
13For example, adding a "Fetch more posts" button inside an observer that should fetch more posts
14automatically when visible. If the observer fails to work for any reason, the button will still be
15clickable, and the experience preserved. Please use a fallback wherever possible as
16**the intersection observer API is not supported in IE11**.