File tree Expand file tree Collapse file tree 1 file changed +7
-26
lines changed Expand file tree Collapse file tree 1 file changed +7
-26
lines changed Original file line number Diff line number Diff line change @@ -289,36 +289,17 @@ WidgetManager.prototype._get_connected_kernel = function() {
289
289
} ) ;
290
290
} ;
291
291
292
+ /**
293
+ * Callback handlers for a specific view
294
+ */
292
295
WidgetManager . prototype . callbacks = function ( view ) {
293
- /**
294
- * callback handlers specific a view
295
- */
296
- var callbacks = { } ;
296
+ var callbacks = widgets . ManagerBase . prototype . callbacks . call ( this , view ) ;
297
297
if ( view && view . options . output ) {
298
- // Try to get output handlers
299
298
var output = view . options . output ;
300
- var handle_output = null ;
301
- var handle_clear_output = null ;
302
- if ( output ) {
303
- handle_output = _ . bind ( output . handle_output , output ) ;
304
- handle_clear_output = _ . bind ( output . handle_clear_output , output ) ;
299
+ callbacks . iopub = {
300
+ output : output . handle_output . bind ( output ) ,
301
+ clear_output : output . handle_clear_output . bind ( output )
305
302
}
306
-
307
- // Create callback dictionary using what is known
308
- var that = this ;
309
- callbacks = {
310
- iopub : {
311
- output : handle_output ,
312
- clear_output : handle_clear_output ,
313
-
314
- // Special function only registered by widget messages.
315
- // Allows us to get the cell for a message so we know
316
- // where to add widgets if the code requires it.
317
- get_cell : function ( ) {
318
- return cell ;
319
- } ,
320
- } ,
321
- } ;
322
303
}
323
304
return callbacks ;
324
305
} ;
You can’t perform that action at this time.
0 commit comments