-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs for wait
command include invalid syntax
#517
Comments
Apart from the parser problem mentioned above, I tried implementing a wait with an event or a duration like in the example (the only difference is that I'm doing it from a function in a ".hs" file and not directly on the HTML element), but the script results in a deadlock, waiting forever for the event to occur. The duration is never considered. If I use the duration alone, there is no problem. Is anyone else having the same issue? EDIT: To add a nuance to what I'm saying, the code above is working except if we start to use the trigger and the from clause of the wait command like this: <button _="on click put 'Started...' into the next <output/>
set continuer to the next <button/>
wait for a continue from continuer or 3s -- wait for a continue event...
if the result's type is 'continue'
put 'Finished...' into the next <output/>
otherwise
put 'Timed Out...' into the next <output/>
end
wait 2s
put '--' into the next <output/>">
Start
</button>
<button _="on click trigger continue">
Continue
</button>
<output>--</output> Maybe I misunderstood the way it works. If someone can help on this I will be very grateful. Thanks. |
I had a similar issue were the syntax I don't know if this would be considered a bug or just the documentation being misleading. |
I haven't had the time to look into that in detail for now but if this is working, this is good ! I'll come back if it fixes my issue. Thank you so much! |
Problem
The documentation for the
wait
command advertises syntax that doesn't actually parse.On this page of the docs:
https://hyperscript.org/commands/wait/#description
This snippet:
Workaround
The comparison
the result is not an Event
, fails to parse, but replacing thean
with ana
makes it hunky dory.Potential Fix
Either we can (1) update the docs, or (2) update the parser to allow the construct of
is not an Event
.I personally favor extending the parser to make this work.
Error
Stacktrace:
The text was updated successfully, but these errors were encountered: