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

Function value

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

Source from the content-addressed store, hash-verified

43 Object.defineProperty(HTMLElement.prototype, 'scrollTo', {
44 configurable: true,
45 value(this: HTMLElement, options: ScrollToOptions) {
46 const next = Math.max(
47 0,
48 Math.min(options.top ?? 0, this.scrollHeight - this.clientHeight),
49 )
50 if (next !== this.scrollTop) {
51 this.scrollTop = next
52 this.dispatchEvent(new Event('scroll'))
53 }
54 },
55 })
56})
57

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected