used to collect json objects that are sent by the js-side of the application by using the send() method

def handle_aladin_event(self, _, content, buffers):
        """ used to collect json objects that are sent by the js-side of the application by using the send() method """
        if content.get('event', '').startswith('callback'):
            if content.get('type') == 'objectHovered':
                result= self.listener_callback_source_hover(content.get('data'))
            elif content.get('type') == 'objectClicked':
                result= self.listener_callback_source_click(content.get('data'))
            elif content.get('type') == 'click':
                result= self.listener_callback_click(content.get('data'))
            elif content.get('type') == 'select':
                result= self.listener_callback_select(content.get('data'))
            result= str(result)
            for i in  range(len(result),self.last_prompt_length):
                result= result+' '
            print(result, end='\r')
            self.last_prompt_length= len(result)