s/target_name/model_name

Jonathan Frederic 12 years ago
parent 24096b0f45
commit 4b968ece0b

@ -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];

@ -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)

Loading…
Cancel
Save