properly clean up observer

This commit is contained in:
Carson Gross 2026-02-22 14:32:05 -07:00
parent 80aacdbbe9
commit f0c2247f63

View File

@ -946,6 +946,7 @@ var htmx = (() => {
for (let spec of elt._htmx.triggerSpecs || []) {
if (spec.interval) clearInterval(spec.interval);
if (spec.timeout) clearTimeout(spec.timeout);
Missing: spec.observer?.disconnect()
}
for (let listenerInfo of elt._htmx.listeners || []) {
listenerInfo.fromElt.removeEventListener(listenerInfo.eventName, listenerInfo.handler);