Hidden-header port. When omitted, index is returned unchanged.
The index to start from.
The direction to scan.
Optionallimit: number
The furthest visible, in-bounds header the scan may reach (inclusive). When every
header from index to the grid edge is hidden, the scan would otherwise march off the grid and
return an out-of-range index; instead it stops and returns limit. Omit to scan unbounded.
Scans from
indexindirectionuntil it lands on a visible (non-hidden) header.