Stephane Angel (Twidi) 86febd3efc
Extension.handleSwap: trigger events for extensions defined on parents
If an element is replaced by an extension in `handleSwap`, the events
(`afterSwap.htmx` and `afterSettle.htmx`) were not received by the
`onLoad` method of extensions defined on parents of the target, because
theses extensions were retrieved after the replacement, and so it was
not possible to get through the parents, the target not being in the dom
anymore.

This commits loads the extensions for the target and save them in
`eventDetail` before doing the swap, so they are accessible in
`triggerEvent`, and passed to `withExtensions` that use this list if
passed (else load them).

A new test is added that fails without the updates in `htmx.js`.
2020-06-12 01:20:13 +02:00
..
2020-05-22 21:50:01 -07:00
2020-05-22 21:50:01 -07:00
2020-05-22 21:50:01 -07:00
2020-05-23 17:06:20 -07:00
2020-05-26 08:36:14 -07:00