Block in htmx:beforeRequest? #1738
Unanswered
tobymurray
asked this question in
Q&A
Replies: 1 comment 3 replies
-
You can use htmx:beforeRequest and then call evt.detail.stopImmediatePropagation() to stop the request while you perform the asynchronous task. Then after your task is complete, you can issue the htmx request using htmx.trigger(). |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to intercept any requests, do some work (await an async function) and then continue with the request. Is that possible?
Trying with htmx:beforeRequest, I don't believe the request waits for the event to be processed.
Beta Was this translation helpful? Give feedback.
All reactions