on_msg

Widget.on_msg(callback, remove=False)[source]

(Un)Register a custom msg receive callback.

Parameters:
  • callback (callable) –

    callback will be passed three arguments when a message arrives:

    callback(widget, content, buffers)
    

  • remove (bool) – True if the callback should be unregistered.