From e9324378e8325d7f25c0965e2a5a436d3329f20e Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Sat, 21 Jul 2012 07:08:49 -0500 Subject: [PATCH] Include the kernel object in the event object passed to kernel events --- IPython/frontend/html/notebook/static/js/kernel.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/IPython/frontend/html/notebook/static/js/kernel.js b/IPython/frontend/html/notebook/static/js/kernel.js index 77292ba47..5a6ce081f 100644 --- a/IPython/frontend/html/notebook/static/js/kernel.js +++ b/IPython/frontend/html/notebook/static/js/kernel.js @@ -64,7 +64,7 @@ var IPython = (function (IPython) { Kernel.prototype.restart = function () { - $([IPython.events]).trigger('status_restarting.Kernel'); + $([IPython.events]).trigger({type: 'status_restarting.Kernel', kernel: this}); var that = this; if (this.running) { this.stop_channels(); @@ -279,7 +279,7 @@ var IPython = (function (IPython) { Kernel.prototype.interrupt = function () { if (this.running) { - $([IPython.events]).trigger('status_interrupting.Kernel'); + $([IPython.events]).trigger({type: 'status_interrupting.Kernel', kernel: this}); $.post(this.kernel_url + "/interrupt"); }; }; @@ -367,12 +367,12 @@ var IPython = (function (IPython) { } } else if (msg_type === 'status') { if (content.execution_state === 'busy') { - $([IPython.events]).trigger('status_busy.Kernel'); + $([IPython.events]).trigger({type: 'status_busy.Kernel', kernel: this}); } else if (content.execution_state === 'idle') { - $([IPython.events]).trigger('status_idle.Kernel'); + $([IPython.events]).trigger({type: 'status_idle.Kernel', kernel: this}); } else if (content.execution_state === 'dead') { this.stop_channels(); - $([IPython.events]).trigger('status_dead.Kernel'); + $([IPython.events]).trigger({type: 'status_dead.Kernel', kernel: this}); }; } else if (msg_type === 'clear_output') { var cb = callbacks['clear_output'];