@@ -3,17 +3,16 @@ using Reactive
3
3
using Compat
4
4
import Compat. String
5
5
6
- import Base: writemime
7
6
import Interact: update_view, Slider, Widget, InputWidget, Latex, HTML, recv_msg,
8
7
statedict, viewdict, Layout, Box,
9
8
Progress, Checkbox, Button, ToggleButton, Textarea, Textbox, Options
10
9
11
- export mimewritable, writemime
10
+ export mimewritable
12
11
13
12
const ijulia_js = readstring (joinpath (dirname (@__FILE__ ), " ijulia.js" ))
14
13
15
14
if displayable (" text/html" )
16
- display (" text/html" , """
15
+ display (" text/html" , Base . Docs . HTML ( """
17
16
<div id="interact-js-shim">
18
17
<script charset="utf-8">$(ijulia_js) </script>
19
18
<script>
@@ -25,7 +24,7 @@ if displayable("text/html")
25
24
})
26
25
\$ ([IPython.events]).on("kernel_starting.Kernel kernel_restarting.Kernel", function () { window.interactLoadedFlag = false })
27
26
</script>
28
- </div>""" )
27
+ </div>""" ))
29
28
end
30
29
31
30
import IJulia
54
53
function init_comm (x:: Signal )
55
54
if ! haskey (comms, x)
56
55
subscriptions = Dict {Compat.ASCIIString, Int} ()
57
- function handle_subscriptions (msg)
56
+ handle_subscriptions = (msg) -> begin
58
57
if haskey (msg. content, " data" )
59
58
action = get (msg. content[" data" ], " action" , " " )
60
59
if action == " subscribe_mime"
@@ -72,7 +71,7 @@ function init_comm(x::Signal)
72
71
# Listen for mime type registrations
73
72
comm. on_msg = handle_subscriptions
74
73
# prevent resending the first time?
75
- function notify (value)
74
+ notify = (value) -> begin
76
75
mimes = keys (filter ((k,v) -> v > 0 , subscriptions))
77
76
if length (mimes) > 0
78
77
send_comm (comm, @compat Dict (:value =>
0 commit comments