HeinrichApfelmus / threepenny-gui

GUI framework that uses the web browser as a display.
https://heinrichapfelmus.github.io/threepenny-gui/
Other
437 stars 77 forks source link

Adding onload event? #231

Open bradrn opened 5 years ago

bradrn commented 5 years ago

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 commented 4 years ago

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?