Purpose
Utility controller to wire up other controller actions when an element comes into or leaves the viewport.
Events
Event | When | Dispatched on | event.detail |
---|
intersection:appear | When the observed element enters the viewport | the controller root element | element : the observed controller root element |
intersection:disappear | When the observed element leaves the viewport | the controller root element | element : the observed controller root element |
Side Effects
Installs an IntersectionObserver to watch the controller element
How to Use