Documentation ¶
Index ¶
- func GetBoosted(r *http.Request) bool
- func GetCurrentURL(r *http.Request) string
- func GetHistoryRestoreRequest(r *http.Request) bool
- func GetPrompt(r *http.Request) string
- func GetRequest(r *http.Request) bool
- func GetTarget(r *http.Request) string
- func GetTrigger(r *http.Request) string
- func GetTriggerName(r *http.Request) string
- func Join(s ...string) string
- func SetLocation(w http.ResponseWriter, url string)
- func SetPushURL(w http.ResponseWriter)
- func SetRedirect(w http.ResponseWriter, url string)
- func SetRefresh(w http.ResponseWriter)
- func SetReplaceURL(w http.ResponseWriter, url string)
- func SetReselect(w http.ResponseWriter)
- func SetReswap(w http.ResponseWriter)
- func SetRetarget(w http.ResponseWriter, target string)
- func SetTrigger(w http.ResponseWriter, event string)
- func SetTriggerAfterSettle(w http.ResponseWriter, event string)
- func SetTriggerAfterSwap(w http.ResponseWriter, event string)
- type Event
- type Events
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBoosted ¶
GetBoosted indicates that the request is via an element using hx-boost.
func GetCurrentURL ¶
GetCurrentURL is the current URL of the browser.
func GetHistoryRestoreRequest ¶
GetHistoryRestoreRequest returns true if the request is for history restoration after a miss in the local history cache.
func GetRequest ¶
GetRequest indicates that it is a HTMX request.
func GetTrigger ¶
GetTrigger is the id of the triggered element if it exists.
func GetTriggerName ¶
GetTriggerName is the name of the triggered element if it exists.
func SetLocation ¶
func SetLocation(w http.ResponseWriter, url string)
SetLocation allows you to do a client-side redirect that does not do a full page reload.
func SetPushURL ¶
func SetPushURL(w http.ResponseWriter)
SetPushURL pushes a new url into the history stack.
func SetRedirect ¶
func SetRedirect(w http.ResponseWriter, url string)
SetRedirect used to do a client-side redirect to a new location.
func SetRefresh ¶
func SetRefresh(w http.ResponseWriter)
SetRefresh will do a client-side full refresh of the page.
func SetReplaceURL ¶
func SetReplaceURL(w http.ResponseWriter, url string)
SetReplaceURL replaces the current URL in the location bar.
func SetReselect ¶
func SetReselect(w http.ResponseWriter)
SetReselect is a CSS selector that allows you to choose which part of the response is used to be swapped in.
func SetReswap ¶
func SetReswap(w http.ResponseWriter)
SetReswap allows you to specify how the response will be swapped.
func SetRetarget ¶
func SetRetarget(w http.ResponseWriter, target string)
SetRetarget is a CSS selector that updates the target of the content update to a different element on the page.
func SetTrigger ¶
func SetTrigger(w http.ResponseWriter, event string)
SetTrigger events as soon as the response is received.
func SetTriggerAfterSettle ¶
func SetTriggerAfterSettle(w http.ResponseWriter, event string)
SetTriggerAfterSettle events after the settling step.
func SetTriggerAfterSwap ¶
func SetTriggerAfterSwap(w http.ResponseWriter, event string)
SetTriggerAfterSwap events after the swap step.
Types ¶
type Event ¶
func NewEventString ¶ added in v0.14.0
func (Event) SetTrigger ¶
func (e Event) SetTrigger(w http.ResponseWriter)
func (Event) SetTriggerAfterSettle ¶
func (e Event) SetTriggerAfterSettle(w http.ResponseWriter)
func (Event) SetTriggerAfterSwap ¶
func (e Event) SetTriggerAfterSwap(w http.ResponseWriter)
type Events ¶ added in v0.14.0
type Events []Event
func MultipleEvents ¶ added in v0.14.0
func (Events) SetTrigger ¶ added in v0.14.0
func (es Events) SetTrigger(w http.ResponseWriter)
func (Events) SetTriggerAfterSettle ¶ added in v0.14.0
func (es Events) SetTriggerAfterSettle(w http.ResponseWriter)
func (Events) SetTriggerAfterSwap ¶ added in v0.14.0
func (es Events) SetTriggerAfterSwap(w http.ResponseWriter)