Dream_htmx
This module provides utilities to deal with Htmx requests/responses.
Requests
is_htmx request
will be true if the request has been issued by htmx.
trigger request
gives the id of the element which trigger the request if available.
trigger_name request
gives the name of the element which trigger the request if available.
target request
gives the id of the target element if available.
prompt request
is the value entered by the user when prompted via hx-prompt.
Responses
push url
pushes a new URL into the browser’s address bar.
redirect url
triggers a client-side redirect to a new location.
set_location url
triggers a client-side redirect to a new location that acts as a swap.
set_trigger_after_swap event
triggers a client side event after the swap step.