Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

in htmx 4 you are able to swap it on a per-trigger basis, so need to muck w/the global fetch function:

   <button hx-get="/foo" hx-on:htmx:config:request="ctx.fetch = myCustomFetch">
     Do It
   </button>


Oh that’ll be much nicer. Would myCustomFetch then need to return a Response?

https://developer.mozilla.org/en-US/docs/Web/API/Response




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: