fn
findFirstVisible
v0.0.5testedReturns the first visible element from a list. Checks visibility up the DOM to `container` (exclusive).
Signature
ts
export function findFirstVisible(elements: HTMLElement[], container: HTMLElement): HTMLElement | undefined{ ... }Parameters
| Parameter | Type | Description |
|---|---|---|
elements | HTMLElement[] | — |
container | HTMLElement | — |
Returns
HTMLElement | undefined