Open aryx opened 4 years ago
Any help? Is this project dead? Should I switch to another OCaml library (e.g., Brr by daniel buenzli?)
The project is actively used, and we are happy to address bug reports, discuss feature wishes or review PRs.
Your question probably requires doing some manual DOM-based code with CustomElements, using Window.requestAnimationFrame. Feel free to experiment, and if you find a solution, to report if something needs to be added to ocaml-vdom to make the task easier.
Is there code I should imitate to do that? I'm a JS/Browser noob.
Is this issue fixed in the vdom 0.3 version? https://discuss.ocaml.org/t/ann-vdom-0-3-functional-ui-applications-now-with-custom-event-handlers/13298
For context, I try to port the elm-playground library to OCaml by using ocaml-vdom.
In elm, one can subscribe to the onAnimationFrame Javascript event to generate a Tick (or `Tick) message that can be used in the update function to provide animations.
I was able to find the onmousemove event in vdom (that I attach as an attribute to the toplevel div), but nothing on animation_frame. @alainfrisch mention I could use custom event for that, but onAnimationFrame is not listed as one of the possible Javascript event.