in src/lib/spells/scroll-state.svelte.ts [157:190]
constructor(options: ScrollStateOptions) {
this.#options = options;
useEventListener(
() => this.element,
"scroll",
// throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,
this.onScrollHandler,
this.eventListenerOptions
);
useEventListener(
() => this.element,
"scrollend",
e => this.onScrollEnd(e),
this.eventListenerOptions
);
onMount(() => {
this.setArrivedState();
});
// useResizeObserver(
// () => (isHtmlElement(this.element) ? this.element : null),
// () => {
// setTimeout(() => {
// this.setArrivedState();
// }, 100);
// }
// );
// overkill?
new AnimationFrames(() => this.setArrivedState());
}