Skip to content

Commit

Permalink
Doc: Update oobBeforeSwap (#2647)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Croker <[email protected]>
  • Loading branch information
amrojjeh and bencroker committed Jun 19, 2024
1 parent f9b3f88 commit dea45c8
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions www/content/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,22 +297,19 @@ This event is triggered as part of an [out of band swap](@/docs.md#oob_swaps) an

##### Details

* `detail.elt` - the element that dispatched the request
* `detail.xhr` - the `XMLHttpRequest`
* `detail.target` - the target of the request
* `detail.requestConfig` - the configuration of the AJAX request
* `detail.shouldSwap` - if the content will be swapped (defaults to `true`)
* `detail.target` - the target of the swap
* `detail.fragment` - the response fragment

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

This event is triggered as part of an [out of band swap](@/docs.md#oob_swaps) and behaves identically to a [before swap event](#htmx:beforeSwap)

##### Details

* `detail.elt` - the element that dispatched the request
* `detail.xhr` - the `XMLHttpRequest`
* `detail.requestConfig` - the configuration of the AJAX request
* `detail.shouldSwap` - if the content will be swapped (defaults to `false` for non-200 response codes)
* `detail.shouldSwap` - if the content will be swapped (defaults to `true`)
* `detail.target` - the target of the swap
* `detail.fragment` - the response fragment

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

Expand Down

0 comments on commit dea45c8

Please sign in to comment.