I’m sure I just haven’t been good enough at reading the docs/source, but I can’t seem to find any obviously canonical way of using Blink.jl without having it quit immediately. I mean, I could use it from the REPL, but other than that? If I run a Julia program such as, say, one based on a simple Interact example, i.e.,
using Interact, Blink
ui = button()
w = Window()
body!(w, ui)
then that runs just fine, setting up the window properly … and then the program quits. If I add, say, an infinite loop or read(stdin) or something at the end, things work as they should, but surely there must be a better way of doing this? (Is there, for example, a process I could wait for, or something?) I’m assuming not everyone is using Blink from the REPL…?
I’m sorry for probably missing something obvious, here :->
Me too. I use that in a context where I have the loop running anyway from a package function in a REPL session, and just need to check the window is still there.
using Blink
window = Window()
# …
success(window.shell.proc)
Still digging into the innards (could be added to the Blink.jl API, perhaps), but beyond that, it also produces an error, as the Julia side seems to keep parsing bytes from Electron, even after you quit it:
Unexpected end of input
...when parsing byte with value '0'
Stacktrace: