def do(self, callback, *userdata):
        """ The callback and userdata gets stored, and if there is some javascript to add
            the js code is appended as attribute for the event source
        """
        if hasattr(self.event_method_bound, '_js_code'):
            self.event_source_instance.attributes[self.event_name] = self.event_method_bound._js_code%{
                'emitter_identifier':self.event_source_instance.identifier, 'event_name':self.event_name}
        self.callback = callback
        self.userdata = userdata
def do ( self , callback , * userdata ) : if hasattr ( self . event_method_bound , '_js_code' ) : self . event_source_instance . attributes [ self . event_name ] = self . event_method_bound . _js_code % { 'emitter_identifier' : self . event_source_instance . identifier , 'event_name' : self . event_name } self . callback = callback self . userdata = userdata
The callback and userdata gets stored, and if there is some javascript to add
            the js code is appended as attribute for the event source