Hequalizer dispatches aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/soyleninjs/hequalizer/llms.txt
Use this file to discover all available pages before exploring further.
CustomEvent on window at the end of every significant lifecycle operation. Each event carries the live Hequalizer instance in event.detail.instance, giving you full access to the current state — heights, breakpoint, elements — the moment the event fires.
All events are dispatched on
window, not on individual DOM elements. Your listeners must be registered with window.addEventListener(...). The event name always uses the exact handle string passed to the constructor, so new Hequalizer('card-title') produces events named hequalizer:card-title:init, hequalizer:card-title:resize, and so on.Event name format
product-title dispatches:
hequalizer:product-title:inithequalizer:product-title:resizehequalizer:product-title:changehequalizer:product-title:updatehequalizer:product-title:refreshhequalizer:product-title:destroy
Event detail
Every event includes the same detail shape:values, actualBreakpoint, $elements, actualOptions, and any other instance property at the time the event fired.
Events reference
hequalizer:{handle}:init
hequalizer:{handle}:init
Emitted when
init() finishes — after fonts are ready, options are resolved, heights are calculated for the first time, and all listeners are active.This is the earliest safe moment to read instance.values or instance.actualBreakpoint.hequalizer:{handle}:resize
hequalizer:{handle}:resize
Emitted after a resize-triggered recalculation completes (respecting any
debounce delay). Not emitted when observeResize is false for the active breakpoint.hequalizer:{handle}:change
hequalizer:{handle}:change
Emitted after a
MutationObserver-triggered recalculation finishes. Fires when the text content, child nodes, or subtree of any tracked element changes. The internal change debounce is always 20 ms.hequalizer:{handle}:update
hequalizer:{handle}:update
Emitted when a manual call to
instance.update() completes.hequalizer:{handle}:refresh
hequalizer:{handle}:refresh
Emitted when
instance.refreshElements() completes — after the DOM has been re-queried and heights have been recalculated for the new element set.hequalizer:{handle}:destroy
hequalizer:{handle}:destroy
Emitted as the last action of
instance.destroy(), just before the instance is removed from Hequalizer.instances. At this point instance.values is already 0 and all CSS variables and classes have been cleared.Comprehensive example
Listening to all events
Event summary table
| Event | Emitted when |
|---|---|
hequalizer:{handle}:init | init() finishes after document.fonts.ready |
hequalizer:{handle}:resize | Resize recalculation finishes (requires observeResize: true) |
hequalizer:{handle}:change | Content-change recalculation finishes via MutationObserver |
hequalizer:{handle}:update | Manual update() call finishes |
hequalizer:{handle}:refresh | refreshElements() call finishes |
hequalizer:{handle}:destroy | destroy() fires, just before instance is removed from Hequalizer.instances |