File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 11Blink 0.8.0
22Mux 0.5.1
3- JSExpr
43IJulia
54NBInclude 2.0.0
65NodeJS
Original file line number Diff line number Diff line change 11using WebIO
22using Blink
33using Observables
4- using JSExpr
54using Test
65
76notinstalled = ! AtomShell. isinstalled ()
4645 end
4746
4847 julia_to_js = Observable (scope, " outbox" , " " )
49- onjs (julia_to_js, @JSExpr . js function (val)
50- $ js_to_julia[] = val
51- end )
48+ onjs (julia_to_js, js """
49+ function (val ) {
50+ _webIOScope .setObservableValue (" inbox" , val);
51+ }
52+ """ )
5253
5354 # Render the scope into the Blink window
5455 body! (w, scope)
6869 # Put the result in a channel so we can watch for it
6970 put! (output, x)
7071 end
71- onimport (scope, @JSExpr . js function (mod)
72- $ js_to_julia[] = mod. x
73- end )
72+ onimport (
73+ scope,
74+ js """
75+ function (mod ) {
76+ _webIOScope .setObservableValue (" inbox" , mod .x );
77+ }
78+ """ )
7479 if use_iframe
7580 body! (w, iframe (scope))
7681 else
Original file line number Diff line number Diff line change 11using WebIO
22using WebSockets
3- using JSExpr
43using Test
54
65@testset " HTTP provider" begin
@@ -37,7 +36,6 @@ function serve_app(req)
3736 end
3837end
3938server = WebIO. WebIOServer (serve_app, logger = stdout , verbose = true )
40- using JSExpr
4139WebIO. wio_asseturl (" /webio/dist/bundle.js" )
4240server. serve_task
4341
5250app[] = w (
5351 dom " button" (
5452 " generate random" ,
55- events= Dict (" click" => @js () -> $ obs[] = Math. random ()),
53+ events= Dict (" click" => js """ function () { _webIOScope . setObservableValue ( ' rand-value ' , Math .random ()); } """ ),
5654 ),
5755);
You can’t perform that action at this time.
0 commit comments