Does anyone have examples of calling Java from JavaScript in a JavaFX webview that was created by cljfx?
Maybe not possible? https://clojurians.slack.com/archives/CGHHJNENB/p1607571654183600
Hmm.
https://github.com/cljfx/cljfx/issues/41#issuecomment-640058782
It's possible!
I don't have simple standalone example at hand, but I do have hairy real world example — :on-signals in reveal's Vega view that gets notifications from js https://github.com/vlaaad/reveal/blob/master/src/vlaaad/reveal/vega.clj#L199
The idea is that you use .setMember on window object to set there a clojure fn — either during init it as a part of a prop https://github.com/vlaaad/reveal/blob/master/src/vlaaad/reveal/vega.clj#L110
And then .invoke it in js when needed — https://github.com/vlaaad/reveal/blob/master/src/vlaaad/reveal/vega.clj#L129