MCPcopy Index your code
hub / github.com/TanStack/virtual / run

Function run

packages/virtual-core/src/index.ts:87–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85
86 const observer = new targetWindow.ResizeObserver((entries) => {
87 const run = () => {
88 const entry = entries[0]
89 if (entry?.borderBoxSize) {
90 const box = entry.borderBoxSize[0]
91 if (box) {
92 handler({ width: box.inlineSize, height: box.blockSize })
93 return
94 }
95 }
96 handler(element.getBoundingClientRect())
97 }
98
99 instance.options.useAnimationFrameWithResizeObserver
100 ? requestAnimationFrame(run)

Callers 2

observeElementRectFunction · 0.70
getMethod · 0.70

Calls 1

handlerFunction · 0.85

Tested by

no test coverage detected