Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very cool! Just a heads up there's a bug with the event control flow example where it requires pressing the "stop pulsing" button the same number of times you've pressed the "start pulsing" button. I figured the behavior should be regardless of how many times I've clicked "start pulsing" the next time I press stop, it should stop.


Ah, you've stumbled on the event queuing behaviour of hyperscript:

If a triggering event is received while an event handler is executing, you can specify various behaviours:

https://hyperscript.org/features/on/#queueing

The default is queue last, which will queue the last event and trigger the event handler again once it completes. I agree that is wrong in this case, and so it should specify `queue none` in the handler. I will update the code.

Thank you for taking a close look at the example!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: