https://htmx.org/events/#htmx:configRequest
you could jam the outerHTML of the detail.target into the detail.parameters map, maybe based on the presence of an attribute...
If I get around of experimenting with that, and it fits my flow, would that be something you'd accept back into the project as a contribution to the code?
htmx.on("htmx:configRequest", function(evt) {
evt.detail.parameters['my-html'] = evt.target.outerHTML; // or whatever
}
you can jump on the discord and we can help you out when the time comes:Might sound not that convenient for basic things like login forms, but I have frontend code that builds dynamic form fields, which I'd like to not replicate via the backend templating language, if extracting data from HTML itself is a breeze in my case.
Of course I'm going to do that myself anyway, but I'd rather use an established library which also handles in browser page restoration/caching (possibly also fragments), instead of rolling my own JS lib.