MCPcopy Create free account
hub / github.com/TanStack/query / value

Function value

packages/query-devtools/test-setup.ts:59–68  ·  view source on GitHub ↗
(this: HTMLElement, options: ScrollToOptions)

Source from the content-addressed store, hash-verified

57 Object.defineProperty(HTMLElement.prototype, 'scrollTo', {
58 configurable: true,
59 value(this: HTMLElement, options: ScrollToOptions) {
60 const next = Math.max(
61 0,
62 Math.min(options.top ?? 0, this.scrollHeight - this.clientHeight),
63 )
64 if (next !== this.scrollTop) {
65 this.scrollTop = next
66 this.dispatchEvent(new Event('scroll'))
67 }
68 },
69 })
70})
71

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected