MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / handleHover

Function handleHover

packages/shared/src/primitives.ts:126–130  ·  view source on GitHub ↗
(e: {target: unknown})

Source from the content-addressed store, hash-verified

124export function makeHoverElementListener(onHover: (el: HTMLElement | null) => void): void {
125 let last: HTMLElement | null = null
126 const handleHover = (e: {target: unknown}): void => {
127 const {target} = e
128 if (target === last || (!(target instanceof HTMLElement) && target !== null)) return
129 onHover((last = target))
130 }
131 makeEventListener(window, 'mouseover', handleHover)
132 makeEventListener(document, 'mouseleave', handleHover.bind(void 0, {target: null}))
133}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…