We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
events.one
events.on
CodeCell.execute
1 parent 32a2932 commit 60a02dfCopy full SHA for 60a02df
notebook/static/notebook/js/codecell.js
@@ -335,11 +335,13 @@ define([
335
this.render();
336
this.events.trigger('execute.CodeCell', {cell: this});
337
var that = this;
338
- this.events.on('finished_iopub.Kernel', function (evt, data) {
+ function handleFinished(evt, data) {
339
if (that.kernel.id === data.kernel.id && that.last_msg_id === data.msg_id) {
340
- that.events.trigger('finished_execute.CodeCell', {cell: that});
341
- }
342
- });
+ that.events.trigger('finished_execute.CodeCell', {cell: that});
+ that.events.off('finished_iopub.Kernel', handleFinished);
+ }
343
344
+ this.events.on('finished_iopub.Kernel', handleFinished);
345
};
346
347
/**
0 commit comments