Skip to content

@serenity-is/corelib / LayoutTimer / onHeightChange

Function: onHeightChange()

onHeightChange(element, handler, opt?): number

Defined in: src/compat/layouttimer.ts:200

Registers a handler invoked only when the height of the element changes. Convenience wrapper around onSizeChange with width: false.

Parameters

element

() => HTMLElement

Factory returning the target HTMLElement.

handler

() => void

Callback invoked on height change.

opt?

Optional debounce configuration.

debounceTimes?

number

Number of polls to debounce before firing.

Returns

number

A numeric registration key.