htmx
htmx copied to clipboard
Add an example of evaluated values passed to hx-headers.
Add an example of evaluated values passed to hx-headers.
Description
I haven't been clear from the documentation how to exactly have the javascript in the attribute evaluated as I'm not such a web dev expert. Perhaps it could help someone else if it's more explicit.
The example is more or less taken from my use case. Please feel free to suggest something else!
HTMX works great with Swift, BTW.
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
- [ ] I ran the test suite locally (
npm run test) and verified that it succeeded
@Telroshan Makes sense, I wasn't aware that the hx-vals page does have an example. And sorry for taking so long!
Thanks!