I must be missing the absolute obvious here:
Using htmx I am trying to send a get request and configure it in javascript before sending it. HTMX provides hx-get, hx-on and the configRequest event for basically exactly that.
However I seem to be missing a big obvious button since I could not get hx-on to perform a function or lambda I give it, only immediate JS works which (by it's nature) cannot accept arguments and therefor cannot access the event.
In short: What am I missing to get the following to work as expected?
...
hx-on:config-request="console.log('This will work π')"will work but obviously cannot engage with the event.hx-on:config-request="() => console.log('This won't work π')"won't workhx-on:config-request="console.log"won't work as wellhx-on:config-request="someOtherKnownMethod"won't work as well
I'm confused. π
Thanks for your time. Some ideas?