clear up oob swap expected behaviour
Description
Try to clarify the expected behavior of oob swap strategies which work a little different to normal swaps. all the non inline swap strategies like beforeend etc seem to work differently than they do with full swaps in that it is the inner contents of the tag supplied with the hx-swap-oob attribute that is swapped in and not the tag itself. This gives you the flexibility to swap in non tag wrapped data if needed and to not add additional hx-swap-oob tags into the DOM that have no client DOM function but it does mean you have to add an additional layer by wrapping the oob content in a dummy div tag sometimes.
Corresponding issue: #2790
Checklist
- [x] I have read the contribution guidelines
- [x] I have targeted this PR against the correct branch (
masterfor website changes,devfor source changes) - [x] This is either a bugfix, a documentation update, or a new feature that has been explicitly approved via an issue
- [x] I ran the test suite locally (
npm run test) and verified that it succeeded
Thank you for taking care of this!
I think we need a very short example to demonstrate how it works with other strategies. I understand what you've added because I know the issue, not sure I would have understood it the first time a read the documentation :-)
Added a couple of examples of other oob syntax
Closing as #2889 merged with better documentation.