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

Fire a "hyperscript:ready" event when hyperscript is done initializing. #511

Open
Jesmaster opened this issue Jan 21, 2024 · 0 comments · May be fixed by #512
Open

Fire a "hyperscript:ready" event when hyperscript is done initializing. #511

Jesmaster opened this issue Jan 21, 2024 · 0 comments · May be fixed by #512

Comments

@Jesmaster
Copy link

I ran into a case where I have some regular js that executes on document ready that will click elements whose click action is defined in inline hyperscript.

When I tried this the click actions did not trigger. I added a small timeout to my code and it worked fine. I checked to see if hyperscript fired any kind of event to let the document know that all the inline hyperscript has been processed but it looks like it doesn't exist.

I've opened a pull request to add a new "hyperscript:ready" event that fires on the document so any js that interacts with hyperscript elements on load can wait on that event to execute. I've tested this on my original use case and it works fine.

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

Successfully merging a pull request may close this issue.

1 participant