Documentation
¶
Index ¶
Constants ¶
View Source
const ( AttrGet = "hx-get" AttrPost = "hx-post" AttrPushUrl = "hx-push-url" AttrSelect = "hx-select" AttrSelectOob = "hx-select-oob" AttrSwap = "hx-swap" AttrSwapOob = "hx-swap-oob" AttrTarget = "hx-target" AttrTrigger = "hx-trigger" AttrVals = "hx-vals" AttrBoost = "hx-boost" AttrConfirm = "hx-confirm" AttrDelete = "hx-delete" AttrDisable = "hx-disable" AttrDisabledElt = "hx-disabled-elt" AttrDisinherit = "hx-disinherit" AttrEncoding = "hx-encoding" AttrExt = "hx-ext" AttrHeaders = "hx-headers" AttrHistory = "hx-history" AttrHistoryElt = "hx-history-elt" AttrInclude = "hx-include" AttrIndicator = "hx-indicator" AttrInherit = "hx-inherit" AttrParams = "hx-params" AttrPatch = "hx-patch" AttrPreserve = "hx-preserve" AttrPrompt = "hx-prompt" AttrPut = "hx-put" AttrReplaceUrl = "hx-replace-url" AttrRequest = "hx-request" AttrSync = "hx-sync" AttrValidate = "hx-validate" AttrVars = "hx-vars" )
Attr* constants are htmx attribute names. Using these constants prevents typos and enables LSP autocompletion.
View Source
const ( SwapInnerHtml = "innerHTML" SwapOuterHtml = "outerHTML" SwapBeforeBegin = "beforebegin" SwapAfterBegin = "afterbegin" SwapBeforeEnd = "beforeend" SwapAfterEnd = "afterend" SwapDelete = "delete" SwapNone = "none" )
Swap* constants are valid values for the hx-swap attribute.
View Source
const ( EventAbort = "htmx:abort" EventAfterOnLoad = "htmx:after-on-load" EventAfterProcessNode = "htmx:after-process-node" EventAfterRequest = "htmx:after-request" EventAfterSettle = "htmx:after-settle" EventAfterSwap = "htmx:after-swap" EventBeforeCleanupElement = "htmx:before-cleanup-element" EventBeforeOnLoad = "htmx:before-on-load" EventBeforeProcessNode = "htmx:before-process-node" EventBeforeRequest = "htmx:before-request" EventBeforeSend = "htmx:before-send" EventBeforeSettle = "htmx:before-settle" EventBeforeSwap = "htmx:before-swap" EventConfigRequest = "htmx:config-request" EventConfirm = "htmx:confirm" EventHistoryCacheError = "htmx:history-cache-error" EventHistoryCacheMiss = "htmx:history-cache-miss" EventHistoryCacheMissError = "htmx:history-cache-miss-error" EventHistoryRestore = "htmx:history-restore" EventLoad = "htmx:load" EventNoSseSourceError = "htmx:no-sse-source-error" EventOnLoadError = "htmx:on-load-error" EventOobAfterSwap = "htmx:oob-after-swap" EventOobBeforeSwap = "htmx:oob-before-swap" EventOobErrorNoTarget = "htmx:oob-error-no-target" EventPrompt = "htmx:prompt" EventResponseError = "htmx:response-error" EventSendError = "htmx:send-error" EventSseError = "htmx:sse-error" EventSseOpen = "htmx:sse-open" EventSseMessage = "htmx:sse-message" EventSwapError = "htmx:swap-error" EventTargetError = "htmx:target-error" 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" )
Event* constants are htmx event names. Use these constants with AttrOn for type-safe inline event handlers.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.