Class: OdinEventTarget<Events>
Enhanced EventTarget, support with Odin Event Generics.
Extended by
Type Parameters
• Events
Constructors
new OdinEventTarget()
new OdinEventTarget<
Events
>():OdinEventTarget
<Events
>
Returns
OdinEventTarget
<Events
>
Methods
addEventListener()
addEventListener<
OdinEventType
>(eventName
,handler
,options
?):void
Type Parameters
• OdinEventType extends string
| number
| symbol
Parameters
• eventName: OdinEventType
• handler: Events
[OdinEventType
]
• options?: boolean
| AddEventListenerOptions
Returns
void
Defined in
Odin/odin-typescript/lib/utils/odin-event-target.d.ts:22
dispatchEvent()
dispatchEvent<
T
>(event
):void
Type Parameters
• T extends OdinEvent
<any
>
Parameters
• event: T
Returns
void
Defined in
Odin/odin-typescript/lib/utils/odin-event-target.d.ts:23
removeEventListener()
removeEventListener<
OdinEventType
>(type
,callback
):void
Type Parameters
• OdinEventType extends string
| number
| symbol
Parameters
• type: string
| OdinEventType
• callback: EventListenerOrEventListenerObject
| Events
[OdinEventType
]
Returns
void
Defined in
Odin/odin-typescript/lib/utils/odin-event-target.d.ts:24