htmx

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	// contains filtered or unexported fields
}

https://htmx.org/reference/#Request_headers

func NewRequest

func NewRequest(h http.Header) *Request

func (*Request) CurrentURL

func (r *Request) CurrentURL() string

func (*Request) IsBoosted

func (r *Request) IsBoosted() bool

func (*Request) IsHTMXRequest

func (r *Request) IsHTMXRequest() bool

func (*Request) IsHistoryRestoreRequest

func (r *Request) IsHistoryRestoreRequest() bool

func (*Request) Prompt

func (r *Request) Prompt() string

func (*Request) TargetID

func (r *Request) TargetID() string

func (*Request) TriggerID

func (r *Request) TriggerID() string

func (*Request) TriggerName

func (r *Request) TriggerName() string

type Response

type Response struct {
	// contains filtered or unexported fields
}

https://htmx.org/reference/#response_headers

func NewResponse

func NewResponse() *Response

func (*Response) SetHeaders

func (r *Response) SetHeaders(w http.ResponseWriter)

func (*Response) WithLocation

func (r *Response) WithLocation(url string) *Response

func (*Response) WithPushURL

func (r *Response) WithPushURL(url string) *Response

func (*Response) WithRedirect

func (r *Response) WithRedirect(url string) *Response

func (*Response) WithRefresh

func (r *Response) WithRefresh() *Response

func (*Response) WithReplaceURL

func (r *Response) WithReplaceURL(url string) *Response

func (*Response) WithReselect

func (r *Response) WithReselect(cssSelector string) *Response

func (*Response) WithReswap

func (r *Response) WithReswap(m SwapMode) *Response

func (*Response) WithRetarget

func (r *Response) WithRetarget(cssSelector string) *Response

func (*Response) WithTrigger

func (r *Response) WithTrigger(event string) *Response

func (*Response) WithTriggerAfterSettle

func (r *Response) WithTriggerAfterSettle(event string) *Response

func (*Response) WithTriggerAfterSwap

func (r *Response) WithTriggerAfterSwap(event string) *Response

type SwapMode

type SwapMode string
const (
	SwapModeInnerHTML   SwapMode = "innerHTML"
	SwapModeOuterHTML   SwapMode = "outerHTML"
	SwapModeBeforebegin SwapMode = "beforebegin"
	SwapModeAfterbegin  SwapMode = "afterbegin"
	SwapModeBeforeend   SwapMode = "beforeend"
	SwapModeAfterend    SwapMode = "afterend"
	SwapModeDelete      SwapMode = "delete"
	SwapModeNone        SwapMode = "none"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL