Skip to content

Commit 58c8a1e

Browse files
author
Pietro Vertechi
committed
interpolate abstract observables
1 parent 3691247 commit 58c8a1e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

REQUIRE

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ julia 0.7
22
JSON
33
MacroTools
44
WebIO 0.3.0
5+
Observables 0.2.2

src/JSExpr.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ using JSON, MacroTools, WebIO
66
export JSString, @js, @js_str, @var, @new
77

88
import WebIO: JSString, JSONContext, JSEvalSerialization
9+
using Observables: AbstractObservable
910

1011
macro js(expr)
1112
:(JSString(string($(jsstring(expr)...))))
@@ -54,7 +55,7 @@ function obs_set_expr(x, val)
5455
F(["WebIO.setval(", jsexpr_joined([x, val]), ")"])
5556
end
5657

57-
function jsexpr(o::WebIO.Observable)
58+
function jsexpr(o::AbstractObservable)
5859
if !haskey(WebIO.observ_id_dict, o)
5960
error("No scope associated with observer being interpolated")
6061
end

0 commit comments

Comments
 (0)