Skip to content

Commit

Permalink
docs: Update multi-swap README.md to clarify the use of multi-swap an…
Browse files Browse the repository at this point in the history
…d OOB swaps (#148)
  • Loading branch information
oliverhaas authored Feb 24, 2025
1 parent 618e8e9 commit d4e37d8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/multi-swap/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@

This extension allows you to swap multiple elements marked with the `id` attribute from the HTML response. You can also choose for each element which [swap method](https://htmx.org/docs#swapping) should be used.
This extension allows you to swap multiple elements marked with the `id` attribute from the HTML response. You can also choose for each element which [swap method](https://htmx.org/docs#swapping) should be used. Multi-swap is a very powerful tool in conjunction with `hx-boost` and `preload` extension.

Multi-swap can help in cases where OOB ([Out of Band Swaps](https://htmx.org/docs#oob_swaps)) is not enough for you. OOB requires HTML tags marked with `hx-swap-oob` attributes to be at the TOP level of HTML, which significantly limited its use. With OOB, it's impossible to swap multiple elements arbitrarily placed and nested in the DOM tree.
It should be noted that using OOB swaps ([Out of Band Swaps](https://htmx.org/docs#oob_swaps)) should be enough for most use cases, since OOB swaps by now can handle nested elements anywhere in the DOM and with a specified swap method. Thus it's recommended to be familiar with OOB swaps to make an informed decision on whether this extension is required anymore.

It is a very powerful tool in conjunction with `hx-boost` and `preload` extension.

## Install

Expand Down

0 comments on commit d4e37d8

Please sign in to comment.