3 ms·
There is an example using event-driven control flow that could be used as a basis for this: https://hyperscript.org/docs/#event-control-flow https://hyperscrip
by recursivedoubts 6y ago
There is an example using event-driven control flow that could be used as a basis for this:
https://hyperscript.org/docs/#event-control-flow https://hyperscript.org/docs/#event-control-flow
Coupled with an async command:
https://hyperscript.org/commands/async/ https://hyperscript.org/commands/async/
The language is very young, so we are still building out the docs and examples.
For something like htmx, where there is already a rich event model around requests, I would instead listen for htmx:beforeRequest and htmx:afterRequest events:
https://htmx.org/reference/#events https://htmx.org/reference/#events
And use that event-driven control flow technique to smoothly end the animation.
- megous 6y agoI see, async command would solve that. Thanks.