MCPcopy Create free account
hub / github.com/bvaughn/react-window / isWindow

Function isWindow

lib/utils/scrollElement.ts:14–16  ·  view source on GitHub ↗
(target: ScrollTarget)

Source from the content-addressed store, hash-verified

12export type ScrollTarget = HTMLElement | Window;
13
14export function isWindow(target: ScrollTarget): target is Window {
15 return (target as Window).window === target;
16}
17
18export function getScrollTarget(
19 containerElement: HTMLElement | null,

Callers 5

useVirtualizerFunction · 0.90
getScrollPositionFunction · 0.85
getMaxScrollPositionFunction · 0.85
getScrollPaddingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected