code: def event_handler(msg: EventMsgDict) -> Event:
      
      e = create_event_from_msg(msg)
      if e.currentTarget is None:
          if e.type not in ['mount', 'unmount']:
              id = msg['currentTarget']['id']
              logger.warning('No such element: wdom_id={}'.format(id))
          return e
      e.currentTarget.on_event_pre(e)
      e.currentTarget.dispatchEvent(e)
      return e
docs: Handle events emitted on browser.