IntersectionObserverShared

Can be used to watch many items, efficiently. Note that the first element to init's top, right, bottom, left and threshold values will be used. We use -150 on the bottom and top here so you can see the observer working without needing dev tools.

In this demo we are using once to unobserve once an element comes into view.

Edit page in GitHub