code: function cancelBodyScrolling(ev: SyntheticWheelEvent<*>) {
    const el = ev.currentTarget;
    if (!(el instanceof Element)) return;
    const { nativeEvent } = ev;
    if (!(nativeEvent instanceof WheelEvent)) return;
    if (nativeEvent.deltaY <= 0) {
      if (el.scrollTop <= 0) cancelEvent(ev);
    } else if (el.scrollTop + el.clientHeight + 0.5 >= el.scrollHeight) {
      cancelEvent(ev);
    }
    stopPropagation(ev);
  }
docs: /* --
  *cancelBodyScrolling()**
  
  `onWheel` event handler that can be attached to a scroller DOM node,
  in order to prevent `wheel` events to cause document scrolling when
  the scroller reaches the top/bottom of its contents.
  
  **ev** *SyntheticWheelEvent<*>*: `wheel` event
  --