From 592da7db387d2baf55b1522b6945c6c39941ae68 2014-01-16 10:57:16 From: Jonathan Frederic Date: 2014-01-16 10:57:16 Subject: [PATCH] Removed get_kernel method. --- diff --git a/IPython/html/static/notebook/js/widgetmanager.js b/IPython/html/static/notebook/js/widgetmanager.js index abea5e9..5529ddf 100644 --- a/IPython/html/static/notebook/js/widgetmanager.js +++ b/IPython/html/static/notebook/js/widgetmanager.js @@ -185,7 +185,10 @@ // for the message. get_cell callbacks are registered for // widget messages, so this block is actually checking to see if the // message was triggered by a widget. - var kernel = this.get_kernel(); + var kernel = null; + if (this.comm_manager !== null) { + kernel = this.comm_manager.kernel; + } if (kernel !== undefined && kernel !== null) { var callbacks = kernel.get_callbacks_for_msg(msg_id); if (callbacks !== undefined && @@ -247,15 +250,6 @@ }; - WidgetManager.prototype.get_kernel = function () { - if (this.comm_manager === null) { - return null; - } else { - return this.comm_manager.kernel; - } - }; - - WidgetManager.prototype._handle_comm_open = function (comm, msg) { var widget_type_name = msg.content.target_name; var widget_model = new this._model_types[widget_type_name](this, comm.comm_id, comm);