Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions www/content/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@ can be paired with [`htmx:beforeRequest`](#htmx:beforeRequest) to wrap behavior
* `detail.xhr` - the `XMLHttpRequest`
* `detail.target` - the target of the request
* `detail.requestConfig` - the configuration of the AJAX request
* `detail.successful` - true if the response has a 20x status code or is marked `detail.isError = false` in the
`htmx:beforeSwap` event, else false
* `detail.failed` - true if the response does not have a 20x status code or is marked `detail.isError = true` in the
`htmx:beforeSwap` event, else false
* `detail.successful` - true if the response is not marked as an error by the matched
[`htmx.config.responseHandling`](@/docs.md#response-handling) rule (by default, a 20x status code) or is marked
`detail.isError = false` in the `htmx:beforeSwap` event, else false. Note that if you customize
`responseHandling` to allow non-2xx codes to swap (e.g. `{"code":"...", "swap": true}` without `error: true`),
those responses will also be marked `successful` here.
* `detail.failed` - true if the response is marked as an error by the matched
[`htmx.config.responseHandling`](@/docs.md#response-handling) rule (by default, a non-20x status code) or is marked
`detail.isError = true` in the `htmx:beforeSwap` event, else false

### Event - `htmx:afterSettle` {#htmx:afterSettle}

Expand Down
Loading