##// END OF EJS Templates
Register the Widget target with the comm manager after construction.
Jonathan Frederic -
Show More
@@ -5,6 +5,7 b' import sys'
5 import traceback
5 import traceback
6
6
7 from IPython.core import release
7 from IPython.core import release
8 from IPython.html.widgets import Widget
8 from IPython.utils.py3compat import builtin_mod, PY3
9 from IPython.utils.py3compat import builtin_mod, PY3
9 from IPython.utils.tokenutil import token_at_cursor, line_at_cursor
10 from IPython.utils.tokenutil import token_at_cursor, line_at_cursor
10 from IPython.utils.traitlets import Instance, Type, Any
11 from IPython.utils.traitlets import Instance, Type, Any
@@ -58,6 +59,8 b' class IPythonKernel(KernelBase):'
58
59
59 self.comm_manager = CommManager(shell=self.shell, parent=self,
60 self.comm_manager = CommManager(shell=self.shell, parent=self,
60 kernel=self)
61 kernel=self)
62 self.comm_manager.register_target('ipython.widget', Widget.handle_comm_opened)
63
61 self.shell.configurables.append(self.comm_manager)
64 self.shell.configurables.append(self.comm_manager)
62 comm_msg_types = [ 'comm_open', 'comm_msg', 'comm_close' ]
65 comm_msg_types = [ 'comm_open', 'comm_msg', 'comm_close' ]
63 for msg_type in comm_msg_types:
66 for msg_type in comm_msg_types:
General Comments 0
You need to be logged in to leave comments. Login now