Show More
@@ -355,12 +355,23 b' define(["components/underscore/underscore-min",' | |||
|
355 | 355 | // Build a callback dict. |
|
356 | 356 | _make_callbacks: function (cell) { |
|
357 | 357 | var callbacks = {}; |
|
358 | if (cell != null && cell.output_area != undefined && cell.output_area != null) { | |
|
358 | if (cell != null) { | |
|
359 | ||
|
360 | // Try to get output handlers | |
|
361 | var handle_output = null; | |
|
362 | var handle_clear_output = null; | |
|
363 | if (cell.output_area != undefined && cell.output_area != null) { | |
|
364 | handle_output = $.proxy(cell.output_area.handle_output, cell.output_area); | |
|
365 | handle_clear_output = $.proxy(cell.output_area.handle_clear_output, cell.output_area); | |
|
366 | } | |
|
367 | ||
|
368 | // Create callback dict usign what is known | |
|
359 | 369 | var that = this; |
|
360 | 370 | callbacks = { |
|
361 | 371 | iopub : { |
|
362 |
output : |
|
|
363 |
clear_output : |
|
|
372 | output : handle_output, | |
|
373 | clear_output : handle_clear_output, | |
|
374 | ||
|
364 | 375 | status : function(msg){ |
|
365 | 376 | that._handle_status(cell, msg); |
|
366 | 377 | }, |
@@ -369,12 +380,7 b' define(["components/underscore/underscore-min",' | |||
|
369 | 380 | // Allows us to get the cell for a message so we know |
|
370 | 381 | // where to add widgets if the code requires it. |
|
371 | 382 | get_cell : function() { |
|
372 | if (that.last_modified_view != undefined && | |
|
373 | that.last_modified_view.cell != undefined) { | |
|
374 | return that.last_modified_view.cell; | |
|
375 | } else { | |
|
376 | return null | |
|
377 | } | |
|
383 | return cell; | |
|
378 | 384 | }, |
|
379 | 385 | }, |
|
380 | 386 | }; |
General Comments 0
You need to be logged in to leave comments.
Login now