HeinrichApfelmus / threepenny-gui

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

Event unregistration #124

Closed jvdp closed 8 years ago

jvdp commented 8 years ago

This PR adds a straightforward implementation of event unregistration as mentioned in #122. I need this for a GUI library I'm building on top of Threepenny.

The onEvent function now has a different signature so that could break code but I left on unchanged, as I consider the latter to be the more 'higher level' function that is probably used more frequently, without need for unregistration.

HeinrichApfelmus commented 8 years ago

Safe for a small change, this looks fine to me. If you can incorporate my comment, I'm happy to merge.

How soon do you need this on hackage?

I need this for a GUI library I'm building on top of Threepenny.

Out of curiosity: What does your GUI library look like?

I have been toying around with the idea of supplying some default CSS styles for Threepenny-GUI and reimplement the row, column and grid combinators in terms of flexboxes to make them less rudimentary.

jvdp commented 8 years ago

I've incorporated your comment and also fixed a few warnings I noticed on travis.

I don't need this on hackage very urgently, I'm working on my prototype with a cabal sandbox for now.

HeinrichApfelmus commented 8 years ago

Looks good to me, thanks!