Documentation ¶
Index ¶
- type Trigger
- type Triggers
- func (t *Triggers) Encode(triggers map[string]*Trigger) (string, error)
- func (t *Triggers) HasAfterSettleTriggers() bool
- func (t *Triggers) HasAfterSwapTriggers() bool
- func (t *Triggers) HasTriggers() bool
- func (t *Triggers) Set(name string, value any)
- func (t *Triggers) SetAfterSettle(name string, value any)
- func (t *Triggers) SetAfterSwap(name string, value any)
- func (t *Triggers) TriggerAfterSettleHeader() (string, error)
- func (t *Triggers) TriggerAfterSwapHeader() (string, error)
- func (t *Triggers) TriggerHeader() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Trigger ¶
type Trigger struct {
// contains filtered or unexported fields
}
Trigger represents an HTMX trigger See the https://htmx.org/headers/hx-trigger/ documentation for more information.
type Triggers ¶
type Triggers struct {
// contains filtered or unexported fields
}
Triggers represents a collection of HTMX triggers
func (*Triggers) HasAfterSettleTriggers ¶
HasAfterSettleTriggers returns true if there are any after-settle triggers
func (*Triggers) HasAfterSwapTriggers ¶
HasAfterSwapTriggers returns true if there are any after-swap triggers
func (*Triggers) HasTriggers ¶
HasTriggers returns true if there are any triggers
func (*Triggers) SetAfterSettle ¶
SetAfterSettle sets a trigger to be called after settle, overwriting any existing after-settle trigger
func (*Triggers) SetAfterSwap ¶
SetAfterSwap sets a trigger to be called after swap, overwriting any existing after-swap trigger
func (*Triggers) TriggerAfterSettleHeader ¶
TriggerAfterSettleHeader returns the HTMX after-settle trigger as an HTTP header value
func (*Triggers) TriggerAfterSwapHeader ¶
TriggerAfterSwapHeader returns the HTMX after-swap trigger as an HTTP header value
func (*Triggers) TriggerHeader ¶
TriggerHeader returns all HTMX triggers as an HTTP header value