mysterious-toddler-20573
02/12/2023, 3:03 AMbrief-flower-84254
02/12/2023, 3:03 AMmysterious-toddler-20573
02/12/2023, 3:03 AMbrief-flower-84254
02/12/2023, 3:06 AMbrief-flower-84254
02/12/2023, 3:07 AMbrief-flower-84254
02/12/2023, 3:12 AMmysterious-toddler-20573
02/12/2023, 3:13 AMbest-fireman-79576
02/12/2023, 7:50 AMtall-dinner-62086
02/12/2023, 11:24 AMbrief-flower-84254
02/12/2023, 4:39 PMbest-fireman-79576
02/13/2023, 3:16 AMbumpy-kangaroo-60192
02/13/2023, 4:17 AMhappy-knife-63802
02/13/2023, 9:54 AMhappy-knife-63802
02/13/2023, 9:55 AMhappy-knife-63802
02/13/2023, 10:13 AMmicroscopic-art-61410
02/13/2023, 4:05 PMmysterious-toddler-20573
02/13/2023, 4:09 PMfamous-iron-45600
02/13/2023, 5:32 PMhx-history="false"
directive on one of my elements and when I click browser back it retrieves page elements from the server and not from the htmx-history-cache
. I've also noticed that when htmx loads history from the server it adds the header HX-History-Restore-Request
around which I've built a custom logic that adds a response header HX-Location
but this response is not handled by the htmx. I've taken some time and did some research on htmx source code and I found that loadHistoryFromServer
function doesn't check for response headers at all. I can understand why, but still wonder if was there any particular reason to handle XMLHttpRequest
differently than handleAjaxResponse
function for instance?busy-tomato-43957
02/13/2023, 8:38 PMbrainy-grass-55742
02/13/2023, 9:08 PMhtml
<button hx-post="/endpoint" id="myid1" hx-target="#result-div1" type="button">
<button hx-post="/endpoint" id="myid2" hx-target="#result-div2" type="button">
Is there a way to get the value of the id that triggered an HTMX event?busy-tomato-43957
02/13/2023, 9:14 PM<button hx-post="/endpoint?id=myid1" id="myid1" hx-target="#result-div1" type="button">
<button hx-post="/endpoint?id=myid2" id="myid2" hx-target="#result-div2" type="button">
But maybe you don't want that solution and you have a good reason for making things more complicated, in that case there also hx-include https://htmx.org/attributes/hx-include/brainy-grass-55742
02/13/2023, 9:20 PMhtmx:responseError
event?mysterious-toddler-20573
02/13/2023, 9:20 PMHX-Trigger
request header (not to be confused w/ the HX-Trigger
response header, which triggers an event)brainy-grass-55742
02/13/2023, 9:23 PMhtmx:responseError
? My evt.detail.triggeringEvent
doesnt show this valuemysterious-toddler-20573
02/13/2023, 9:27 PMmysterious-toddler-20573
02/13/2023, 9:27 PMmysterious-toddler-20573
02/13/2023, 9:28 PMmysterious-toddler-20573
02/13/2023, 9:28 PMbrainy-grass-55742
02/13/2023, 9:29 PMevt.target.id
echoing-dress-67727
02/13/2023, 9:31 PM