Skip to content
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

Calling hyperscript functions from javascript #556

Closed
rauwebieten opened this issue Aug 1, 2024 · 1 comment
Closed

Calling hyperscript functions from javascript #556

rauwebieten opened this issue Aug 1, 2024 · 1 comment

Comments

@rauwebieten
Copy link

Following the guide on https://hyperscript.org/docs/#functions

This does not seem to work:
Uncaught ReferenceError: waitAndReturn is not defined

https://jsfiddle.net/rauwebieten2/mrhfktgd/1/

@1cg
Copy link
Contributor

1cg commented Dec 13, 2024

this is a timing issue: the javascript executes before the hyperscript does, if you put the call on a button event handler and click it you'll see it works. Not a ton we can do about that unfortunately.

@1cg 1cg closed this as completed Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants