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

Adding onload event? #231

Open
bradrn opened this issue Oct 14, 2018 · 1 comment
Open

Adding onload event? #231

bradrn opened this issue Oct 14, 2018 · 1 comment

Comments

@bradrn
Copy link
Contributor

bradrn commented Oct 14, 2018

At the moment, there seems to be no way to add a handler for the onload event to the body; while you can do it using do { b <- getBody; on (domEvent "load") b $ _ }, the handler only seems to be added after the body has already loaded.

@HeinrichApfelmus
Copy link
Owner

Hm, that's tricky. The body is initially empty and populated with elements only due to actions performed by the final argument to startGUI. So, by the time your Haskell code runs, the body is already loaded.

What do you need the onload event for, specifically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants