useCurrentElement

grabs the nearest descendent element of what ever the current element is

Demo

Open console to see current element

Usage

const const current: Signal<Element | undefined>current = useCurrentElement<Element>(): Signal<Element | undefined>useCurrentElement()