Open wavewave opened 9 years ago
I also created a pull request #4 making ghcjs-vdom compatible with the newest virtual-dom
(2.0.1 as of now)
now ghcjs-dom-delegator has a working example (very trivial though). dom-delegator
uses a global singleton Delegator
. In javascript virtual-dom
, h
function of virtual-hyperscript
automatically registers ev-blah
properties as blah
event handler using the global Delegator
singleton. Since ghcjs-vdom
does not use virtual-hyperscript
, we had better have our own similar function hook. I am going to make that extension now.
nice :) . Would be nice if we could directly define what events we are handling within the node definition just like with virtual-hyperscript
First success with ghcjs-vdom and ghcjs-dom-delegator! My WIP is on registerevent branch of my repo.
The newest version of
virtual-dom
supports event handling using dom-delegator library. Here is a nice writeup on the inner-working ofvirtual-dom
anddom-delegator
which is used in themercury
MVC framework : Raynos/mercury#151I started implementing FFI binding to
dom-delegator
in http://github.com/wavewave/ghcjs-dom-delegator I will keep my progress posted here.