code: def _add_event_in_element(self, element, event):
          
  
          if not self.main_script_added:
              self._generate_main_scripts()
  
          if self.script_list is not None:
              self.id_generator.generate_id(element)
              self.script_list.append_text(
                  event
                  + "Elements.push('"
                  + element.get_attribute('id')
                  + "');"
              )
docs: Add a type of event in element.
  
          :param element: The element.
          :type element: hatemile.util.html.htmldomelement.HTMLDOMElement
          :param event: The type of event.
          :type event: str