def __init__(self, type: str, init: EventMsgDict = None) -> None:
        """Create event object.

        First argument (type) is a string to represents type of this event.
        Second optional argument (init) is a dictionally, which has fields for
        this event's status.
        """
        from wdom.document import getElementByWdomId
        self.type = type
        self.init = dict() if init is None else init
        _id = self.init.get('currentTarget', {'id': None}).get('id')
        ctarget = getElementByWdomId(_id)
        self.__currentTarget = ctarget
        _id = self.init.get('target', {'id': None}).get('id')
        self.__target = getElementByWdomId(_id) or ctarget
def __init__ ( self , type : str , init : EventMsgDict = None ) -> None : from wdom . document import getElementByWdomId self . type = type self . init = dict ( ) if init is None else init _id = self . init . get ( 'currentTarget' , { 'id' : None } ) . get ( 'id' ) ctarget = getElementByWdomId ( _id ) self . __currentTarget = ctarget _id = self . init . get ( 'target' , { 'id' : None } ) . get ( 'id' ) self . __target = getElementByWdomId ( _id ) or ctarget
Create event object.

        First argument (type) is a string to represents type of this event.
        Second optional argument (init) is a dictionally, which has fields for
        this event's status.