Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module defines a type that represents events that originate from the HTMX library itself https://htmx.org/reference/#events
Synopsis
- data HtmxEvent
- = Abort
- | AfterOnLoad
- | AfterProcessNode
- | AfterRequest
- | AfterSettle
- | AfterSwap
- | BeforeCleanupElement
- | BeforeOnLoad
- | BeforeProcessNode
- | BeforeRequest
- | BeforeSwap
- | BeforeSend
- | ConfigRequest
- | Confirm
- | HistoryCacheError
- | HistoryCacheMiss
- | HistoryCacheMissError
- | HistoryCacheMissLoad
- | HistoryRestore
- | BeforeHistorySave
- | Load
- | NoSSESourceError
- | OnLoadError
- | OobAfterSwap
- | OobBeforeSwap
- | OobErrorNoTarget
- | Prompt
- | PushedIntoHistory
- | ResponseError
- | SendError
- | SseError
- | SseOpen
- | SwapError
- | TargetError
- | Timeout
- | ValidationValidate
- | ValidationFailed
- | ValidationHalted
- | XhrAbort
- | XhrLoadend
- | XhrLoadstart
- | XhrProgress
Documentation
https://htmx.org/reference/#events A sum type that represents possible events originating from the HTMX javascript library
Abort | send this event to an element to abort a request |
AfterOnLoad | triggered after an AJAX request has completed processing a successful response |
AfterProcessNode | triggered after htmx has initialized a node |
AfterRequest | triggered after an AJAX request has completed |
AfterSettle | triggered after the DOM has settled |
AfterSwap | triggered after new content has been swapped in |
BeforeCleanupElement | triggered before htmx disables an element or removes it from the DOM |
BeforeOnLoad | triggered before any response processing occurs |
BeforeProcessNode | triggered before htmx initializes a node |
BeforeRequest | triggered before an AJAX request is made |
BeforeSwap | triggered before a swap is done, allows you to configure the swap |
BeforeSend | triggered just before an ajax request is sent |
ConfigRequest | triggered before the request, allows you to customize parameters, headers |
Confirm | triggered after a trigger occurs on an element, allows you to cancel (or delay) issuing the AJAX request |
HistoryCacheError | triggered on an error during cache writing |
HistoryCacheMiss | triggered on a cache miss in the history subsystem |
HistoryCacheMissError | triggered on a unsuccessful remote retrieval |
HistoryCacheMissLoad | triggered on a successful remote retrieval |
HistoryRestore | triggered when htmx handles a history restoration action |
BeforeHistorySave | triggered before content is saved to the history cache |
Load | triggered when new content is added to the DOM |
NoSSESourceError | triggered when an element refers to a SSE event in its trigger, but no parent SSE source has been defined |
OnLoadError | triggered when an exception occurs during the onLoad handling in htmx |
OobAfterSwap | triggered after an out of band element as been swapped in |
OobBeforeSwap | triggered before an out of band element swap is done, allows you to configure the swap |
OobErrorNoTarget | triggered when an out of band element does not have a matching ID in the current DOM |
Prompt | triggered after a prompt is shown |
PushedIntoHistory | triggered after an url is pushed into history |
ResponseError | triggered when an HTTP response error (non-200 or 300 response code) occurs |
SendError | triggered when a network error prevents an HTTP request from happening |
SseError | triggered when an error occurs with a SSE source |
SseOpen | triggered when a SSE source is opened |
SwapError | triggered when an error occurs during the swap phase |
TargetError | triggered when an invalid target is specified |
Timeout | triggered when a request timeout occurs |
ValidationValidate | triggered before an element is validated |
ValidationFailed | triggered when an element fails validation |
ValidationHalted | triggered when a request is halted due to validation errors |
XhrAbort | triggered when an ajax request aborts |
XhrLoadend | triggered when an ajax request ends |
XhrLoadstart | triggered when an ajax request starts |
XhrProgress | triggered periodically during an ajax request that supports progress events |