I'm rewriting some old code we had that used window.onScroll to set the active state of the current sub-section of the page. I'm trying to use IntersectionObserver, but with short sections, it's observing two active sections at once. Essentially I'm looking to mimic the behavior of the side nav on Mozilla: https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event- it only marks a section as active when it's on the top close to the sticky menu. Anybody have any good resources or code with examples?? Thanks!