hx

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT, MIT Imports: 3 Imported by: 9

Documentation

Index

Constants

View Source
const (
	// ClassAdded Applied to a new piece of content before it is swapped, removed after it is settled.
	ClassAdded = "htmx-added"

	// ClassIndicator A dynamically generated class that will toggle visible (opacity:1) when a htmx-request class is present
	ClassIndicator = "htmx-indicator"

	// ClassRequest Applied to either the element or the element specified with hx-indicator while a request is ongoing
	ClassRequest = "htmx-request"

	// ClassSettling Applied to a target after content is swapped, removed after it is settled. The duration can be modified via hx-swap.
	ClassSettling = "htmx-settling"

	// ClassSwapping Applied to a target before any content is swapped, removed after it is swapped. The duration can be modified via hx-swap.
	ClassSwapping = "htmx-swapping"
)
View Source
const (
	EventAbort                 = "htmx:abort"
	EventAfterOnLoad           = "htmx:afterOnLoad"
	EventAfterProcessNode      = "htmx:afterProcessNode"
	EventAfterRequest          = "htmx:afterRequest"
	EventAfterSettle           = "htmx:afterSettle"
	EventAfterSwap             = "htmx:afterSwap"
	EventBeforeCleanupElement  = "htmx:beforeCleanupElement"
	EventBeforeOnLoad          = "htmx:beforeOnLoad"
	EventBeforeProcessNode     = "htmx:beforeProcessNode"
	EventBeforeRequest         = "htmx:beforeRequest"
	EventBeforeSwap            = "htmx:beforeSwap"
	EventBeforeSend            = "htmx:beforeSend"
	EventConfigRequest         = "htmx:configRequest"
	EventConfirm               = "htmx:confirm"
	EventHistoryCacheError     = "htmx:historyCacheError"
	EventHistoryCacheMiss      = "htmx:historyCacheMiss"
	EventHistoryCacheMissError = "htmx:historyCacheMissError"
	EventHistoryCacheMissLoad  = "htmx:historyCacheMissLoad"
	EventHistoryRestore        = "htmx:historyRestore"
	EventBeforeHistorySave     = "htmx:beforeHistorySave"
	EventLoad                  = "htmx:load"
	EventNoSSESourceError      = "htmx:noSSESourceError"
	EventOnLoadError           = "htmx:onLoadError"
	EventOobBeforeSwap         = "htmx:oobBeforeSwap"
	EventOobErrorNoTarget      = "htmx:oobErrorNoTarget"
	EventPrompt                = "htmx:prompt"
	EventPushedIntoHistory     = "htmx:pushedIntoHistory"
	EventResponseError         = "htmx:responseError"
	EventSendError             = "htmx:sendError"
	EventSseError              = "htmx:sseError"
	EventSseOpen               = "htmx:sseOpen"
	EventSwapError             = "htmx:swapError"
	EventTargetError           = "htmx:targetError"
	EventTimeout               = "htmx:timeout"
	EventValidationValidate    = "htmx:validation:validate"
	EventValidationFailed      = "htmx:validation:failed"
	EventValidationHalted      = "htmx:validation:halted"
	EventXhrAbort              = "htmx:xhr:abort"
	EventXhrLoadEnd            = "htmx:xhr:loadend"
	EventXhrLoadStart          = "htmx:xhr:loadstart"
	EventXhrProgress           = "htmx:xhr:progress"
)
View Source
const (
	EventScrollTop    = "scroll:top"
	EventScrollBottom = "scroll:bottom"
	EventWindowTop    = "window:top"
	EventWindowBottom = "window:bottom"
)
View Source
const (
	RequestHeaderBoosted               = "HX-Boosted"
	RequestHeaderCurrentUrl            = "HX-Current-URL"
	RequestHeaderHistoryRestoreRequest = "HX-History-Restore-Request"
	RequestHeaderPrompt                = "HX-Prompt"
	RequestHeaderRequest               = "HX-Request"
	RequestHeaderTarget                = "HX-Target"
	RequestHeaderTriggerName           = "HX-Trigger-Name"
	RequestHeaderTrigger               = "HX-Trigger"
)
View Source
const (
	ResponseHeaderLocation           = "HX-Location"
	ResponseHeaderPushUrl            = "HX-Push-Url"
	ResponseHeaderRedirect           = "HX-Redirect"
	ResponseHeaderRefresh            = "HX-Refresh"
	ResponseHeaderReplaceUrl         = "HX-Replace-Url"
	ResponseHeaderReswap             = "HX-Reswap"
	ResponseHeaderRetarget           = "HX-Retarget"
	ResponseHeaderReselect           = "HX-Reselect"
	ResponseHeaderTrigger            = "HX-Trigger"
	ResponseHeaderTriggerAfterSettle = "HX-Trigger-After-Settle"
	ResponseHeaderTriggerAfterSwatp  = "HX-Trigger-After-Swap"
)
View Source
const (
	SwapInnerHtml   = "innerHTML"
	SwapOuterHtml   = "outerHTML"
	SwapBeforeBegin = "beforebegin"
	SwapAfterBegin  = "afterbegin"
	SwapBeforeEnd   = "beforeend"
	SwapAfterEnd    = "afterend"
	SwapDelete      = "delete"
	SwapNone        = "none"
)
View Source
const (
	IgnoreStatus = http.StatusNoContent
)

Variables

This section is empty.

Functions

func Append

func Append() gox.Node

func Boost

func Boost() gox.Node

func Confirm

func Confirm(value ...string) gox.Node

func Delete

func Delete(value ...string) gox.Node

func Disable

func Disable() gox.Node

func DisabledElt

func DisabledElt() gox.Node

func Disinherit

func Disinherit(value ...string) gox.Node

func Encoding

func Encoding(value ...string) gox.Node

func Ext

func Ext(value ...string) gox.Node

func Get

func Get(value ...string) gox.Node

func HashId

func HashId(id string) string

func Headers

func Headers(value ...map[string]any) gox.Node

func History

func History(value ...string) gox.Node

func HistoryElt

func HistoryElt(value ...string) gox.Node

func Id

func Id(id string) string

func Include

func Include(value ...string) gox.Node

func Indicator

func Indicator(value ...string) gox.Node

func On

func On(event string, value ...string) gox.Node

func Params

func Params(value ...string) gox.Node

func Patch

func Patch(value ...string) gox.Node

func Post

func Post(value ...string) gox.Node

func Preserve

func Preserve() gox.Node

func Prompt

func Prompt(value ...string) gox.Node

func PushUrl

func PushUrl() gox.Node

func Put

func Put(value ...string) gox.Node

func ReplaceUrl

func ReplaceUrl() gox.Node

func Request

func Request(value ...string) gox.Node

func SelectOob

func SelectOob(value ...string) gox.Node

func Swap

func Swap(value ...string) gox.Node

func SwapOob

func SwapOob(value ...string) gox.Node

func Sync

func Sync(value ...string) gox.Node

func Target

func Target(value ...string) gox.Node

func Trigger

func Trigger(value ...string) gox.Node

func Validate

func Validate(value ...string) gox.Node

func Vals

func Vals(value ...string) gox.Node

func Ws added in v0.2.1

func Ws(url string) gox.Node

Types

This section is empty.

Jump to

Keyboard shortcuts

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