wide-airport-20686
09/14/2021, 8:17 PMmysterious-toddler-20573
09/14/2021, 8:37 PMmysterious-toddler-20573
09/14/2021, 8:37 PMable-zebra-49180
09/15/2021, 7:46 AMable-zebra-49180
09/15/2021, 7:49 AMfamous-memory-784
09/15/2021, 5:59 PMhx-swap="beforeend".mysterious-toddler-20573
09/15/2021, 6:00 PMmysterious-toddler-20573
09/15/2021, 6:01 PMmysterious-toddler-20573
09/15/2021, 6:01 PMmysterious-toddler-20573
09/15/2021, 6:01 PMbeforeend should be inside the triggering element, or is there a target involved as well?famous-memory-784
09/15/2021, 6:04 PM<form class="comment-reply mt-2" hx-post="{{comment_reply_url}}"
hx-target="closest .comment-main" hx-swap="beforeend"
_="
on htmx:beforeRequest hide me
then set value of <textarea/> in me to null
on htmx:afterOnLoad go to the bottom of closest .comment-main smoothly
"
>famous-memory-784
09/15/2021, 6:05 PMfamous-memory-784
09/15/2021, 6:06 PMhtmx:afteronload works, but I wasn't sure if it would fire when there was an Ajax error too. What I really want is an event that would fire after any/all DOM manipulations are finished.mysterious-toddler-20573
09/15/2021, 8:06 PMmysterious-toddler-20573
09/15/2021, 8:06 PMhtmx:afterRequest is fired no matter what happens w/ the requestmysterious-toddler-20573
09/15/2021, 8:07 PMhtmx:afterOnLoad is working for you, you could add handlers for htmx:sendError and htmx:sendAbort to handle the error situations (if you are using hyperscript, you can chain them together in one handler with an or)mysterious-toddler-20573
09/15/2021, 8:07 PMmost-flag-2080
09/15/2021, 10:37 PMmost-flag-2080
09/15/2021, 10:41 PMmysterious-toddler-20573
09/15/2021, 10:46 PMmysterious-toddler-20573
09/15/2021, 10:46 PMbillions-microphone-84331
09/16/2021, 9:20 AM/v1/myresource for their api. Do you do the same for htmx with something like /fragment/myresource or you just avoid having a prefix, and just use "normal" uri (same way as for regular pages)?
Hope the question makes sense.tall-dinner-62086
09/16/2021, 9:55 AMmysterious-toddler-20573
09/16/2021, 10:59 AMHX-Redirect response header to make the front end issue a full request to the download URL. Alternatively, you can simply use a "normal" link to the URL.mysterious-toddler-20573
09/16/2021, 11:03 AM/contacts - returns the UI for all contacts, may check for HX-Request header to render without a layout
/contacts/:id - same, renders normally and also without a layout, depending on headers
/contacts/:id/notes - provides an inline editing UI for the contact details page, htmx only
etc.
the idea with the first two is that they should work when those URLs are boosted w/ hx-boost, but also when someone goes directly to them via a deep link, or hits refresh.
the last one is specific to a given internal UI and never ends up in the nav bar, so it can be htmx only.red-farmer-97020
09/16/2021, 11:59 AMbillions-microphone-84331
09/16/2021, 12:04 PMmysterious-toddler-20573
09/16/2021, 12:35 PM