From b322e72bee2a3f69a1bc8b9bf22f65c2fde27d22 Mon Sep 17 00:00:00 2001 From: MinRK Date: Tue, 17 Sep 2013 11:02:51 -0700 Subject: [PATCH] add Kernel.clear_callbacks_for_msg --- IPython/html/static/services/kernels/js/kernel.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/IPython/html/static/services/kernels/js/kernel.js b/IPython/html/static/services/kernels/js/kernel.js index d7e3f5cc7..b3c2e83ec 100644 --- a/IPython/html/static/services/kernels/js/kernel.js +++ b/IPython/html/static/services/kernels/js/kernel.js @@ -403,9 +403,16 @@ var IPython = (function (IPython) { }; + Kernel.prototype.clear_callbacks_for_msg = function (msg_id) { + if (this._msg_callbacks[msg_id] !== undefined ) { + delete this._msg_callbacks[msg_id]; + } + }; + + Kernel.prototype.set_callbacks_for_msg = function (msg_id, callbacks) { this._msg_callbacks[msg_id] = callbacks || {}; - } + }; Kernel.prototype._handle_shell_reply = function (e) {