htmx
htmx copied to clipboard
Event not set for "special" events
I have server endpoint that I need to process several different events. For this to work I am using the event-header extension. It works fine except for the special event load.
Looking at the code I see that the extension is dependent on the triggeringEvent information received from the main code. There it looks like reveal (in maybeReveal) and load (in loadImmediately) do not pass the event parameter to issueAjaxRequest, because there is no event to pass, I guess.
Currently I work around this by assuming that if I do not get the event info, it is a load, but obviously this is not ideal, and I will run into trouble as soon as I want to utilise reveal.
Would it be possible for the methods above to pass a minimum viable "event", e.g. {type: "load"} to issueAjaxRequest?
Definitely a bug. Will try to get it fixed for the next release.