diff --git a/IPython/html/static/widgets/js/manager.js b/IPython/html/static/widgets/js/manager.js index 862ff03de..114ca962b 100644 --- a/IPython/html/static/widgets/js/manager.js +++ b/IPython/html/static/widgets/js/manager.js @@ -175,7 +175,7 @@ define([ // Handle when a comm is opened. var that = this; var model_id = comm.comm_id; - var widget_type_name = msg.content.data.target_name; + var widget_type_name = msg.content.data.model_name; var widget_model = new WidgetManager._model_types[widget_type_name](this, model_id, comm); widget_model.on('comm:close', function () { delete that._models[model_id]; diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index 965fb954f..815ad9c49 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -140,7 +140,7 @@ class Widget(LoggingConfigurable): def open(self): """Open a comm to the frontend if one isn't already open.""" if self.comm is None: - args = dict(target_name='ipython.widget', data={ 'target_name': self._model_name }) + args = dict(target_name='ipython.widget', data={ 'model_name': self._model_name }) if self._model_id is not None: args['comm_id'] = self._model_id self.comm = Comm(**args)