Fork me on GitHub
#cljfx
<
2022-06-18
>
zane01:06:51

Does anyone have examples of calling Java from JavaScript in a JavaFX webview that was created by cljfx?

vlaaad06:06:41

It's possible!

vlaaad06:06:14

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

vlaaad06:06:14

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