@vlaaad good grief, working with the javafx webview is hard! i managed to finally call some js code from inside clojure and then some clojure code from inside js, if you are interested in making that possible
@vlaaad here’s a gist of the basic idea to get both directions working: https://gist.github.com/Cyrik/4928f9db6af820af6fc443c50c958be5 I’d be nice if I could get the WebView without touching the internal of cljfx, but I only just started looking at it. Quick question about cljfx threading stuff: is there a way for me to run some of my code in that tread and to jump back into my thread from an eventHandler?
fx/on-fx-thread to run code on ui thread
Back into your thread — that looks like something you need to setup yourself..
Do you only need serial execution on your thread? Maybe you could use agents in that case..
> back into … yeah I don’t think I need anything complicated there. the idea would be to rerun the code that generated some visualization when you click on a specific part of the vega renderer. I haven’t fully figured out the controls or the flow yet, but I’d like to be able to use vega as a UI for my lib, so that they can communicate back and forth. Is there an example somewhere of calling back into user code from a reveal view on the users thread that i could borrow?
There is a small Vega example I did before, but that's without 2-way interactions..
ah sorry, I explained myself incorrectly. I’ve got my vega running already. what i meant i meant was just a very basic call from inside a reveal window into the user code thread, but i’ll check the docs for that.
Yes I am! I've been meaning to improve web view to host interop, but couldn't find the time so far
If you have some snippets to share, that would be nice :)