Minimalistic example of IPython kernel javascript bi-directional communication Minimalistic example of IPython kernel javascript bi-directional communication python python

Minimalistic example of IPython kernel javascript bi-directional communication


I can answer to your second question. The fact is when JavaScript calls your callback, it makes it so without specifying the context, i.e. without setting this (Pythonistas call it self). But it's possible to bound a function to this via $.proxy, which you saw in:

var callbacks = { 'output': $.proxy(output_area.handle_output, output_area) };