code: def attach(self, canvas):
          
          self.canvas = canvas
  
          @canvas.connect
          def on_visual_added(e):
              self.update_program(e.visual.program)
docs: Attach this interact to a canvas.