MCPcopy Index your code
hub / github.com/TanStack/table / passiveEventSupported

Function passiveEventSupported

packages/table-core/src/features/ColumnSizing.ts:554–575  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

552
553let passiveSupported: boolean | null = null
554export function passiveEventSupported() {
555 if (typeof passiveSupported === 'boolean') return passiveSupported
556
557 let supported = false
558 try {
559 const options = {
560 get passive() {
561 supported = true
562 return false
563 },
564 }
565
566 const noop = () => {}
567
568 window.addEventListener('test', noop, options)
569 window.removeEventListener('test', noop)
570 } catch (err) {
571 supported = false
572 }
573 passiveSupported = supported
574 return passiveSupported
575}
576
577function isTouchStartEvent(e: unknown): e is TouchEvent {
578 return (e as TouchEvent).type === 'touchstart'

Callers 1

ColumnSizing.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…