I'm struggling to understand how to use WebIO. From the documentation, this would be an example to send values to javascript:
using WebIO
s = Scope()
obs = Observable(s, "logme", "")
onjs(
s, "logme",
js"""
function(newValue) {
console.log(newValue);
}
"""
)
Now, in order to test this, I run it in the REPL followed by
using Mux
WebIO.webio_serve(
page("/", req -> s)
)
then point my browser (Brave) to localhost:8000 and open the console (via developer tools). At this point, I expect that running obs[] = "hi there" in the REPL would make that message show up in the console. But nothing happens. Why is my understanding of the expected behavior wrong? What should I do to make the javascript console log a message that I write to an observable on the julia side?