bigskysoftware / bigskysoftware/_hyperscript
toggle <something> until <event> at last <timeout>
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
Typical usage of `toggle` is to disable a button on a click until a response is loaded, e.g.:
`on click toggle [@disabled=true] until htmx:afterOnLoad`
In case a response fails somehow, the button remains disabled.
I would invite some sort of timeout option which would toggle back either on an event or at given timeout, whatever comes sooner.
E.g.:
`on click toggle [@disabled=true] until htmx:afterOnLoad at last in 5s`
or explain me, how it can be done today.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.